-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.54 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
name: CI
on:
pull_request:
branches: [develop]
push:
branches: [develop]
env:
CACHED_DEPENDENCY_PATHS: |
${{ github.workspace }}/.yarn/cache
${{ github.workspace }}/.yarn/unplugged
CACHED_BUILD_PATHS: ${{ github.workspace }}/.next
BUILD_CACHE_KEY: ${{ github.sha }}
DEFAULT_NODE_VERSION: "v18.17.0"
jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.17.0
uses: actions/setup-node@v3
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Install dependencies
run: yarn install --immutable
- name: Check Lint
if: ${{ github.event_name == 'pull_request' }}
run: yarn lint && yarn stylelint
- name: Check Unit Test
run: yarn test:coverage
job_publish_storybook_chromatic:
name: Chromatic Publish
runs-on: ubuntu-latest
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Set node linker to nodeModules
run: yarn config set nodeLinker "node-modules"
- name: Install dependencies
run: yarn install --immutable
- uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
skip: "dependabot/**"
exitOnceUploaded: true
onlyChanged: true