-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.18 KB
/
ci.yaml
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
name: continuous-integration
on: [push, pull_request]
jobs:
CI:
name: continuous-integration
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Check for cached node_modules
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --nonInteractive --frozen-lockfile
- name: Lint
run: yarn run lint:ci
- name: Build
run: yarn run build
# TO-DO: Uncomment when tests are ready to be run on CI (such as those in issues #129-#131)
# - name: Test
# run: yarn test:ci