Skip to content

Commit cf1ab06

Browse files
authored
Merge pull request #14 from node-oauth/add-ci
Add CI
2 parents b9aae53 + dcd8a3d commit cf1ab06

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/tests.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Test suite
2+
3+
on:
4+
push:
5+
branches:
6+
- master # allthough master is push protected we still keep it
7+
- development
8+
pull_request: # runs on all PR
9+
10+
jobs:
11+
# ----------------------------------
12+
# uncomment when a linter is added
13+
# ----------------------------------
14+
15+
# lintjs:
16+
# name: Javascript lint
17+
# runs-on: ubuntu-latest
18+
# steps:
19+
# - name: checkout
20+
# uses: actions/checkout@v2
21+
#
22+
# - name: setup node
23+
# uses: actions/setup-node@v1
24+
# with:
25+
# node-version: '12.x'
26+
#
27+
# - name: cache dependencies
28+
# uses: actions/cache@v1
29+
# with:
30+
# path: ~/.npm
31+
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32+
# restore-keys: |
33+
# ${{ runner.os }}-node-
34+
# - run: npm ci
35+
# - run: npm run lint
36+
37+
unittest:
38+
name: unit tests
39+
runs-on: ubuntu-latest
40+
# uncomment when a linter is added
41+
# needs: [lintjs]
42+
steps:
43+
- name: checkout
44+
uses: actions/checkout@v2
45+
46+
- name: setup node
47+
uses: actions/setup-node@v1
48+
with:
49+
node-version: '12.x'
50+
51+
- name: cache dependencies
52+
uses: actions/cache@v1
53+
with:
54+
path: ~/.npm
55+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
56+
restore-keys: |
57+
${{ runner.os }}-node-
58+
- run: npm ci
59+
- run: npm run test
60+
# uncomment when coverage is added
61+
# - run: npm run test:coverage
62+
63+
# ----------------------------------
64+
# uncomment when a linter is added
65+
# ----------------------------------
66+
67+
# - name: check coverage
68+
# uses: devmasx/coverage-check-action@v1.2.0
69+
# with:
70+
# type: lcov
71+
# result_path: coverage/lcov.info
72+
# min_coverage: 90
73+
# token: ${{github.token}}
74+

0 commit comments

Comments
 (0)