Repository navigation
104 lines (90 loc) · 2.83 KB
/
Copy pathdeploy.yml
File metadata and controls
104 lines (90 loc) · 2.83 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
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
name: Verify and deploy
on:
pull_request:
branches: [master]
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: verify-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
verify:
name: Verify
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc
cache: npm
- name: Use pinned npm
run: npm install --global npm@11.6.2
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Check portable math types
run: npm run check:math
- name: Test
run: npm test
- name: Audit dependencies
run: npm audit --audit-level=moderate
- name: Build
run: npm run build
- name: Upload artifact
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: dist
visual:
name: Visual references
runs-on: windows-2022
timeout-minutes: 15
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc
cache: npm
- name: Use pinned npm
run: npm install --global npm@11.6.2
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Install pinned Chromium
run: node node_modules/playwright/cli.js install chromium
- name: Compare reference scenes
run: npm run test:visual
- name: Upload visual report and differences
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: visual-reference-results
path: |
playwright-report/
test-results/
retention-days: 14
if-no-files-found: ignore
deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
needs: [verify, visual]
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4