This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API tests to CI and setup code coverage (#39)
* fix get job config tests * update * add examples and mock * mock all api tests and add to unittests * update * update apiTestCase.json * add coveralls * update * update * update * add nyc * update coveralls * update * fix coverall * fix * fix * add code coverage badge to readme * update * update * update * fix * update mocha version * add all unit tests to coverage * update swagger version * update swagger * sync swagger
- Loading branch information
Showing
16 changed files
with
2,056 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Code coverage | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: npm install, build, test | ||
run: | | ||
npm install | ||
npm run code-coverage | ||
mkdir coverage | ||
npm run coveralls | ||
- name: Coveralls GitHub Action | ||
uses: coverallsapp/github-action@v1.1.1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Path to lcov file | ||
path-to-lcov: ./coverage/lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ node_modules | |
.tests/ | ||
.lib/ | ||
lib/ | ||
.nyc_output/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
"all": true, | ||
"cache": false, | ||
"include": [ | ||
"src/**/*.ts" | ||
], | ||
"require": [ | ||
"ts-node/register", | ||
"source-map-support/register", | ||
"tsconfig-paths/register" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[] | ||
{"tests":[], "map":{}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.