-
Notifications
You must be signed in to change notification settings - Fork 52
63 lines (61 loc) · 1.75 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
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [main, beta, v1, v2]
pull_request:
types: [opened, synchronize, reopened]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
CI: ${{ vars.CI }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Check quality
runs-on: ubuntu-latest
strategy:
matrix:
command:
[
'prepack',
'ci:attw',
'ci:eslint',
'ci:publint',
'ci:sherif',
'ci:type',
'ci:test',
'ci:knip',
'ci:bench',
'build',
]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-setup-node
- run: pnpm install --frozen-lockfile
- if: matrix.command == 'ci:test'
run: pnpm playwright install
- run: pnpm ${{ matrix.command }}
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- if: matrix.command == 'ci:test'
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- if: matrix.command == 'ci:bench'
uses: CodSpeedHQ/action@v2
with:
run: pnpm ci:bench
token: ${{ secrets.CODSPEED_TOKEN }}
- if: matrix.command == 'prepack'
uses: preactjs/compressed-size-action@v2
with:
pattern: 'packages/**/dist/*.{js,cjs,mjs}'
exclude: '{**/*.map,**/node_modules/**}'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- if: matrix.command == 'build'
uses: transferwise/actions-next-bundle-analyzer@v2
with:
working-directory: ./websites/visualization
comment-strategy: 'always'