-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (29 loc) · 874 Bytes
/
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
name: CI
on: push
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Cache application node_modules
id: cache-npm-modules
uses: actions/cache@v2
with:
path: node_modules
key: npm-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-npm-modules.outputs.cache-hit != 'true'
run: npm install
- name: Format
run: npm run format
- name: Check type
run: npm run type-check
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Check data
run: npm run generate-data && test `git status -s src/data/* | wc -l` = 0 || (echo Generate and commit the latest data! && false)