-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (37 loc) · 1.19 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
name: CI
on:
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
# https://www.karltarvas.com/2020/12/09/github-actions-cache-yarn-install.html
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
# See: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-16.x-${{ hashFiles('yarn.lock') }}
# `--prefer-offline` gives cache priority
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Run lint
run: make lint
- name: Run build
run: make build
- name: Run integration_test
run: make integration_test
- name: Run acceptance_test
run: make acceptance_test