-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (46 loc) · 1.41 KB
/
ci.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
name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- task: formatting:check
- task: tsc
- task: lint
- task: test
- task: e2e
- task: build
- task: verify-dist
- task: build-storybook
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-node-env
- run: make ${{ matrix.task }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() && matrix.task == 'e2e' }}
with:
name: playwright-report
path: ./libs/@guardian/libs/playwright-report/
retention-days: 14
chromatic:
needs: validate
uses: ./.github/workflows/chromatic.yml
permissions:
checks: write
secrets:
CHROMATIC_SOURCE_TOKEN: ${{ secrets.CHROMATIC_SOURCE_TOKEN }}
CHROMATIC_SOURCE_DEVELOPMENT_KITCHEN_TOKEN: ${{ secrets.CHROMATIC_SOURCE_DEVELOPMENT_KITCHEN_TOKEN }}
CHROMATIC_REACT_CROSSWORD: ${{ secrets.CHROMATIC_REACT_CROSSWORD }}
if: |
github.ref == 'refs/heads/main' ||
contains(github.event.pull_request.labels.*.name, 'run_chromatic') ||
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'gu-changesets-release-pr[bot]'