Add workflows

This commit is contained in:
Pavel Murygin 2022-02-19 00:03:46 +03:00
parent cf839b51d8
commit b7059ed863
2 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,38 @@
name: Run tests for "browser to browser example"
on:
push:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./quickstart/1-browser-to-browser
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-v1-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-v1-node-${{ matrix.node-version }}
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: run tests
env:
CI: true
run: |
npm i
npm build
npm test

38
.github/workflows/test-template.yml.off vendored Normal file
View File

@ -0,0 +1,38 @@
name: Run tests for <project name>
on:
push:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: <path/to/project>
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-v1-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-v1-node-${{ matrix.node-version }}
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: run tests
env:
CI: true
run: |
npm i
npm build
npm test