-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (37 loc) · 965 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
32
33
34
35
36
37
38
39
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Test and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '15'
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: yarn-${{ runner.OS }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-${{ runner.OS }}-${{ env.cache-name }}
yarn-${{ runner.OS }}-
- name: Install dependencies
# "--frozen-lockfile" doesn't work, see https://github.com/yarnpkg/yarn/issues/5840
run: |
yarn install
if [[ -n "$(git status -s yarn.lock)" ]] ; then
echo "yarn.lock is outdated"
exit 1
fi
- name: Run tests
run: yarn test
- name: Build
run: yarn build