Repository navigation
60 lines (56 loc) · 1.92 KB
/
Copy pathvalidate-gallery.yml
File metadata and controls
60 lines (56 loc) · 1.92 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
name: Validate gallery
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: gallery-validation-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate gallery
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: site
steps:
- name: Check out the pull request merge
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22"
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install locked dependencies
run: npm ci
- name: Validate README view tracking
run: npm run validate:readme-trackers
- name: Test catalog, rendering, and publication logic
run: npm test
- name: Test the collectible-card sample reference source
working-directory: samples/collectible-card-binder
run: python3 -B -m unittest discover -s tests -v
- name: Check types and sample metadata
run: npm run check
- name: Build the gallery
run: npm run build
- name: Validate generated pages, images, and anchors
run: npm run validate:links
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Test desktop, mobile, accessibility, and tracking
run: npm run test:e2e
- name: Save failure diagnostics
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: gallery-browser-failure-${{ github.run_id }}
path: |
site/test-results/
site/playwright-report/
if-no-files-found: ignore
retention-days: 7