2022-06-17 10:50:54 +10:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "master"
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
examples_build_and_test:
|
|
|
|
strategy:
|
2022-08-07 16:33:22 +10:00
|
|
|
fail-fast: false
|
2022-06-17 10:50:54 +10:00
|
|
|
matrix:
|
|
|
|
example:
|
|
|
|
[
|
2022-08-08 12:47:28 +10:00
|
|
|
eth-pm,
|
|
|
|
relay-angular-chat,
|
2022-06-17 10:50:54 +10:00
|
|
|
relay-reactjs-chat,
|
|
|
|
store-reactjs-chat,
|
2022-08-08 12:47:28 +10:00
|
|
|
web-chat
|
2022-06-17 10:50:54 +10:00
|
|
|
]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2022-08-07 17:47:48 +10:00
|
|
|
- name: Install NodeJS
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2023-01-04 21:36:54 +01:00
|
|
|
node-version: "18"
|
2022-12-23 23:10:06 +01:00
|
|
|
cache: "npm"
|
|
|
|
cache-dependency-path: "*/package-lock.json"
|
2022-08-07 17:47:48 +10:00
|
|
|
|
2022-08-08 12:43:12 +10:00
|
|
|
- name: install
|
2022-12-24 02:11:04 +01:00
|
|
|
run: npm install
|
2023-01-04 22:19:35 +01:00
|
|
|
working-directory: "examples/${{ matrix.example }}"
|
2022-08-07 17:47:48 +10:00
|
|
|
|
2022-08-08 12:50:34 +10:00
|
|
|
- name: build
|
2022-12-23 23:10:06 +01:00
|
|
|
run: npm run build
|
2023-01-04 22:19:35 +01:00
|
|
|
working-directory: "examples/${{ matrix.example }}"
|
2022-08-08 12:50:34 +10:00
|
|
|
|
2022-08-08 12:43:12 +10:00
|
|
|
- name: test
|
2022-12-23 23:10:06 +01:00
|
|
|
run: npm run test --if-present
|
2023-01-04 22:19:35 +01:00
|
|
|
working-directory: "examples/${{ matrix.example }}"
|