-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
57 lines (53 loc) · 1.68 KB
/
Copy pathregression.yml
File metadata and controls
57 lines (53 loc) · 1.68 KB
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
name: Regression Test
env:
# For debugging, you can override this to your fork to test.
REPO: 'svg/svgo'
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
regression:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v6
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn
- run: yarn install
- run: yarn playwright install --with-deps chromium
- run: yarn test:regression
# We use upload/artifacts instead of outputs because our regression test
# report can exceed 1 MB which is a limit GitHub imposes.
- uses: actions/upload-artifact@v7
if: success() || failure()
with:
name: svgo-test-report-${{ github.sha }}
path: /tmp/svgo.${{ github.sha }}/svgo-test-report.json
if-no-files-found: error
retention-days: 1
delta:
if: success() || failure()
runs-on: ubuntu-latest
needs:
- regression
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v6
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn
- run: yarn install
- run: gh run download -R ${{ env.REPO }} -n svgo-test-report-${{ github.sha }} -D /tmp/svgo.${{ github.sha }}/
- run: gh run download -R ${{ env.REPO }} -n svgo-test-report -D /tmp/svgo.main/
- run: ./test/regression/delta.js /tmp/svgo.main/svgo-test-report.json /tmp/svgo.${{ github.sha }}/svgo-test-report.json