-
Notifications
You must be signed in to change notification settings - Fork 94
39 lines (37 loc) · 1.1 KB
/
examples.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: Build, test and deploy examples
on: [push]
jobs:
build:
name: Build on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [10]
steps:
- uses: actions/setup-node@v1
with:
node-version: "10.x"
- uses: actions/checkout@v1
- name: Cache node modules
id: cache-modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install
- name: Bootstrap
run: yarn bootstrap
- name: Build examples
run: yarn build:examples
- name: Test examples
run: yarn test:examples --maxWorkers=2
- name: Deploy examples
if: github.ref == 'master'
run: yarn deploy:examples