Skip to content

Add CI #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Test suite

on:
push:
branches:
- master # allthough master is push protected we still keep it
- development
pull_request: # runs on all PR

jobs:
# ----------------------------------
# uncomment when a linter is added
# ----------------------------------

# lintjs:
# name: Javascript lint
# runs-on: ubuntu-latest
# steps:
# - name: checkout
# uses: actions/checkout@v2
#
# - name: setup node
# uses: actions/setup-node@v1
# with:
# node-version: '12.x'
#
# - name: cache dependencies
# uses: actions/cache@v1
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - run: npm ci
# - run: npm run lint

unittest:
name: unit tests
runs-on: ubuntu-latest
# uncomment when a linter is added
# needs: [lintjs]
steps:
- name: checkout
uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run test
# uncomment when coverage is added
# - run: npm run test:coverage

# ----------------------------------
# uncomment when a linter is added
# ----------------------------------

# - name: check coverage
# uses: devmasx/[email protected]
# with:
# type: lcov
# result_path: coverage/lcov.info
# min_coverage: 90
# token: ${{github.token}}