-
Notifications
You must be signed in to change notification settings - Fork 29
68 lines (58 loc) · 1.83 KB
/
continuous-integration.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
64
65
66
67
68
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
concurrency:
group: continuous-integration-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'yarn'
- name: Turbo cache
if: ${{ github.ref_name != 'main' }}
id: turbo-cache
uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-
- run: yarn run install-frozen-lockfile
- run: yarn svgr
- run: yarn run lint
- name: Run Coverage Report
if: '!github.event.pull_request.head.repo.fork'
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: xvfb-run -a yarn run cover
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov
- name: Run Fork Coverage
if: 'github.event.pull_request.head.repo.fork'
run: xvfb-run -a yarn run cover
- name: Publish to Chromatic
if: '!github.event.pull_request.head.repo.fork'
uses: chromaui/action@v11
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: 'webview'
exitOnceUploaded: true
autoAcceptChanges: 'main'
onlyChanged: true
externals: '**/*.scss'