-
Notifications
You must be signed in to change notification settings - Fork 248
69 lines (62 loc) · 1.86 KB
/
ci-pr.yml
File metadata and controls
69 lines (62 loc) · 1.86 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
name: Continuous Integration
on:
pull_request:
types:
- opened
- reopened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22.20.0'
cache: 'yarn'
- uses: actions/cache@v5
id: yarn-cache
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v5
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.job }}
restore-keys: |
turbo-${{ runner.os }}-
- run: yarn
if: steps.yarn-cache.outputs.cache-hit != 'true'
- name: Build, lint and test
id: build-lint-test
run: yarn run ci
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Visual regression
id: visual-regression
run: yarn turbo run visual-regression --cache-dir=".turbo" --concurrency=1
- name: Upload visual-regression results
uses: actions/upload-artifact@v7
if: failure()
with:
name: 'playwright-visual-results-${{ github.event.number }}'
path: '**/test-results'
- name: Upload storybooks
uses: actions/upload-artifact@v7
with:
name: 'storybooks-${{ github.event.number }}'
path: |
packages/fuselage/storybook-static
packages/onboarding-ui/storybook-static
packages/layout/storybook-static