|
6 | 6 | branches: [main] |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - changes: |
10 | | - runs-on: ubuntu-latest |
11 | | - outputs: |
12 | | - ui: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ui }} |
13 | | - steps: |
14 | | - - uses: actions/checkout@v4 |
15 | | - - name: Detect UI changes |
16 | | - if: github.event_name == 'pull_request' |
17 | | - id: filter |
18 | | - uses: dorny/paths-filter@v3 |
19 | | - with: |
20 | | - filters: | |
21 | | - ui: |
22 | | - - 'components/**' |
23 | | - - 'src/app/layout.tsx' |
24 | | - - 'src/app/globals.css' |
25 | | - - 'src/app/stream/new/**' |
26 | | - - 'src/app/stream/[id]/**' |
27 | | - - 'src/lib/theme.tsx' |
28 | | - - 'e2e/visual-regression.spec.ts' |
29 | | - - 'e2e/analytics-visual-regression.spec.ts' |
30 | | -
|
31 | 9 | lint: |
32 | 10 | runs-on: ubuntu-latest |
33 | 11 | steps: |
|
45 | 23 | env: |
46 | 24 | NEXT_PUBLIC_STELLAR_NETWORK: testnet |
47 | 25 | NEXT_PUBLIC_CONTRACT_ID: CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM |
48 | | - |
49 | | - a11y: |
50 | | - runs-on: ubuntu-latest |
51 | | - needs: lint |
52 | | - steps: |
53 | | - - uses: actions/checkout@v4 |
54 | | - - uses: actions/setup-node@v4 |
55 | | - with: |
56 | | - node-version: 22 |
57 | | - cache: npm |
58 | | - - run: npm ci |
59 | | - - name: Install Playwright browsers |
60 | | - run: npx playwright install --with-deps chromium |
61 | | - - name: Accessibility audit (axe-core) |
62 | | - run: npm run a11y |
63 | | - env: |
64 | | - NEXT_PUBLIC_STELLAR_NETWORK: testnet |
65 | | - NEXT_PUBLIC_CONTRACT_ID: CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM |
66 | | - - name: Upload a11y report |
67 | | - if: always() |
68 | | - uses: actions/upload-artifact@v4 |
69 | | - with: |
70 | | - name: a11y-report |
71 | | - path: playwright-report-a11y/ |
72 | | - |
73 | | - visual-regression: |
74 | | - runs-on: ubuntu-latest |
75 | | - needs: changes |
76 | | - if: needs.changes.outputs.ui == 'true' |
77 | | - steps: |
78 | | - - uses: actions/checkout@v4 |
79 | | - - uses: actions/setup-node@v4 |
80 | | - with: |
81 | | - node-version: 22 |
82 | | - cache: npm |
83 | | - - run: npm ci |
84 | | - - name: Install Playwright browsers |
85 | | - run: npx playwright install --with-deps chromium |
86 | | - - name: Visual regression test |
87 | | - run: npx playwright test e2e/visual-regression.spec.ts e2e/analytics-visual-regression.spec.ts --project=chromium |
88 | | - env: |
89 | | - NEXT_PUBLIC_STELLAR_NETWORK: testnet |
90 | | - NEXT_PUBLIC_CONTRACT_ID: CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM |
0 commit comments