Skip to content

Commit

Permalink
Merge pull request #1 from bolitj01/GitHub-workflows
Browse files Browse the repository at this point in the history
initial workflow
  • Loading branch information
bolitj01 authored Nov 20, 2023
2 parents ceccfdd + 79a3283 commit af16866
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:

test:
Expand All @@ -27,6 +30,7 @@ jobs:

- name: NPM install, build and test
run: |
cd Mocha/mongo_express_api
npm install
npm test
env:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Node.JS CI/CD

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 }}

0 comments on commit af16866

Please sign in to comment.