-
Notifications
You must be signed in to change notification settings - Fork 79
44 lines (42 loc) · 1.15 KB
/
build.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
name: build
on:
pull_request:
branches: "**"
push:
paths-ignore:
- "**.md"
jobs:
build:
name: Build on node ${{ matrix.node-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
yarn install
- name: Build
run: |
yarn run build
- name: Lint
if: matrix.os == 'ubuntu-latest'
run: |
yarn run lint