-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.31 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
all:
name: Lint, check format, build, and test
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
- name: Setup yarn with corepack
run: corepack enable && corepack install
- name: Setup Node again with yarn cache
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Check for duplicate dependencies
run: yarn dedupe --check
- name: Setup lint cache
uses: actions/[email protected]
with:
path: node_modules/.cache
key: lint-${{ github.sha }}
restore-keys: lint-
- name: Check javascript and typescript
run: yarn run lint:js
- name: Check format
run: yarn run lint:format
- name: Build package
run: yarn run build
- name: Run Tests
run: yarn run test