Skip to content

Commit a06ace2

Browse files
committed
Setup a GitHub Action for the examples.
1 parent dd003c3 commit a06ace2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/examples.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build, test and deploy examples
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Build on node ${{ matrix.node_version }} and ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
steps:
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: "10.x"
13+
- uses: actions/checkout@v1
14+
- name: Cache node modules
15+
uses: actions/cache@v1
16+
with:
17+
path: node_modules
18+
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}
19+
restore-keys: |
20+
${{ runner.OS }}-build-${{ env.cache-name }}-
21+
${{ runner.OS }}-build-
22+
${{ runner.OS }}-
23+
- name: Bootstrap
24+
run: yarn bootstrap
25+
- name: Build examples
26+
run: yarn build:examples
27+
- name: Test examples
28+
run: yarn test:examples --maxWorkers=2
29+
- name: Deploy examples
30+
if: github.ref == 'master'
31+
run: yarn deploy:examples

0 commit comments

Comments
 (0)