-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (90 loc) · 2.34 KB
/
pull_request.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
name: Pull request
on: pull_request
permissions: read-all
jobs:
check-auto-tagging-will-work:
uses: climatepolicyradar/reusable-workflows/.github/workflows/check-auto-tagging-will-work.yml@v17
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
THEME: cpr
steps:
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
percy:
runs-on: ubuntu-latest
env:
THEME: cpr
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
- run: npm install
- run: cp .env.example .env
- run: npm run build
env:
NODE_ENV: production
- run: npm run start &
- run: |
echo "Waiting for server to start..."
npx wait-on http://localhost:3000
- run: npx percy snapshot snapshots.js
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- if: always()
run: kill $(lsof -t -i:3000) || true
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
- run: npm install
- uses: trunk-io/trunk-action@v1
with:
arguments: --ci
permissions:
# For trunk to post annotations
checks: write
# For repo checkout
contents: read
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
- run: npm install
- run: cp .env.example .env
- run: npm run build
env:
NODE_ENV: production
- run: npm run test
test-e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.12.0
- run: npm ci
- run: cp .env.example .env
- run: npm run build
env:
NODE_ENV: production
- run: npx playwright install --with-deps
- run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30