-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (43 loc) · 1.16 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
name: CI
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
run-linters:
name: Lint, Jest & Storybook
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: v18.5.0
cache: npm
- name: Cache NPM dependencies
uses: actions/cache@v3
id: cache-primes
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install dependencies # (3)
if: steps.cache-primes.outputs.cache-hit != 'true'
run: npm ci
- name: Run linters
run: npm run lint
- name: Test
run: npm run test -- --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
- name:
run: npm run build
- name: Build storybook
run: npm run build-storybook
- name: Deploy storybook
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
clean: true