generated from Kibibit/kb-lib-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.03 KB
/
api-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: API Tests
on:
workflow_dispatch:
pull_request:
paths:
- 'server/**'
push:
branches:
- master
- next
jobs:
unittest:
name: API Tests
runs-on: ubuntu-18.04
steps:
- name: Checkout Commit
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 4.2
- name: Install Dependencies
run: |
npm ci
npm install
- name: Build
run: npm run build --if-present
- name: Run API Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run test:api
- name: Archive test results & coverage
uses: actions/upload-artifact@v2
with:
name: server-unit-tests-code-coverage-report
path: test-results/api