-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (110 loc) · 4.24 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: CI
on:
pull_request:
branches:
- main
jobs:
optimize-images:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pulumi-dev:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.18.3'
cache: 'npm'
- run: npm ci
working-directory: pulumi
- uses: pulumi/actions@v3
with:
command: preview
stack-name: dev
comment-on-pr: true
github-token: ${{ secrets.GITHUB_TOKEN }}
work-dir: pulumi
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
pulumi-prd:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.18.3'
cache: 'npm'
- run: npm ci
working-directory: pulumi
- uses: pulumi/actions@v3
with:
command: preview
stack-name: prod
comment-on-pr: true
github-token: ${{ secrets.GITHUB_TOKEN }}
work-dir: pulumi
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
validate:
runs-on: ubuntu-20.04
env:
CLERK_API_KEY: ${{ secrets.CLERK_API_KEY }}
DSN: ${{ secrets.DSN }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
NEXT_PUBLIC_CLERK_FRONTEND_API: ${{ secrets.NEXT_PUBLIC_CLERK_FRONTEND_API }}
NEXT_PUBLIC_DATADOG_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_DATADOG_CLIENT_TOKEN }}
NEXT_PUBLIC_FATHOM_SITE_ID: ${{ secrets.NEXT_PUBLIC_FATHOM_SITE_ID }}
NEXT_PUBLIC_RECAPTCHA_SITE_KEY: ${{ secrets.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}
RECAPTCHA_SECRET_KEY: ${{ secrets.RECAPTCHA_SECRET_KEY }}
DOMAIN: http://localhost:3000
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.18.3'
cache: 'npm'
- run: npm ci
- run: npm run validate
acceptance:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.18.3'
cache: 'npm'
- run: npm i -g npm@8
- run: npm run docker:infra && sleep 5
- uses: cypress-io/github-action@v2
with:
browser: chrome
install-command: npm ci
build: npm run build
start: npm run start
spec: cypress/integration/*
config: baseUrl=http://localhost:3000,port=4000
wait-on: 'http://localhost:3000'
env:
CLERK_API_KEY: ${{ secrets.CLERK_API_KEY }}
DSN: postgresql://lukeandjadi_com@localhost:26666/defaultdb?sslmode=disable
JWT_SECRET: ${{ secrets.JWT_SECRET }}
NEXT_PUBLIC_CLERK_FRONTEND_API: ${{ secrets.NEXT_PUBLIC_CLERK_FRONTEND_API }}
NEXT_PUBLIC_DATADOG_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_DATADOG_CLIENT_TOKEN }}
NEXT_PUBLIC_FATHOM_SITE_ID: ${{ secrets.NEXT_PUBLIC_FATHOM_SITE_ID }}
NEXT_PUBLIC_RECAPTCHA_SITE_KEY: ${{ secrets.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}
RECAPTCHA_SECRET_KEY: ${{ secrets.RECAPTCHA_SECRET_KEY }}
DOMAIN: http://localhost:3000
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos