Merge pull request #2 from bolitj01:GitHub-workflows #2
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
name: Mocha Tests | |
on: | |
push: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
mocha-tests: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.JS ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: NPM install, build and test | |
run: | | |
cd Mocha/mongo_express_api | |
npm install | |
npm test | |
env: | |
DBHOST: ${{ secrets.DBHOST }} | |
TOKEN_SECRET: ${{ secrets.TOKEN_SECRET }} | |
JWT_EXPIRES_IN: ${{ secrets.JWT_EXPIRES_IN }} |