Add GitHub actions setup to run tests on master and PRs

This commit is contained in:
Rickard Natt och Dag 2021-02-05 14:55:52 +01:00
parent 765c5d252f
commit bafba1b568
No known key found for this signature in database
GPG Key ID: C3958EFC7F24E8DF
3 changed files with 56 additions and 0 deletions

26
.github/workflows/pr_check.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Run tests on PR
on:
pull_request:
branches:
- master
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
- name: Install dependencies
run: |
npm i -g lerna
lerna bootstrap
- name: Run tests
run: npm test
env:
CI: true

27
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
- name: Install dependencies
run: |
npm i -g lerna
lerna bootstrap
- name: Run tests
run: npm test
env:
CI: true

View File

@ -3,5 +3,8 @@
"private": true,
"devDependencies": {
"lerna": "^3.22.1"
},
"scripts": {
"test": "lerna run test --stream"
}
}