-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from atlp-rwanda/feat-user-login-187419055
#187419055 Added tests for user-login
- Loading branch information
Showing
13 changed files
with
1,067 additions
and
1,129 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 |
---|---|---|
@@ -1,18 +1,14 @@ | ||
# This workflow will install node dependencies, run tests and report coverage | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- feat-test-CI-implementation-187419042 | ||
- "*" | ||
- develop | ||
|
||
- "*" | ||
pull_request: | ||
branches: | ||
- develop | ||
- "*" | ||
|
||
jobs: | ||
test: | ||
|
@@ -22,6 +18,11 @@ jobs: | |
DB_TEST_URL: ${{ secrets.DB_TEST_URL }} | ||
DEV_MODE: ${{ secrets.DEV_MODE }} | ||
DB_HOSTED_MODE: ${{ secrets.DB_HOSTED_MODE }} | ||
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }} | ||
SESSION_SECRET: ${{ secrets.SESSION_SECRET }} | ||
JWT_SECRET: ${{ secrets.JWT_SECRET }} | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -37,15 +38,32 @@ jobs: | |
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run tests | ||
run: npm run test | ||
|
||
- name: Run tests and build test coverage | ||
run: npm run test:ci | ||
|
||
- name: Test & publish code climate coverage | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run test:ci | ||
debug: true | ||
coverageLocations: | | ||
${{github.workspace}}/*.lcov:lcov | ||
- name: Setup Code Climate test-reporter | ||
run: | | ||
# Download test reporter as a static binary | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
./cc-test-reporter before-build | ||
- name: Run tests | ||
run: npm run test | ||
|
||
- name: Store coverage report | ||
if: always() | ||
run: mkdir -p coverage | ||
|
||
|
||
- name: Send coverage report to Code Climate | ||
if: always() | ||
run: ./cc-test-reporter after-build -t lcov -p coverage | ||
|
||
- name: coveralls | ||
run: npx coveralls < coverage/lcov.info | ||
|
||
|
Oops, something went wrong.