Add prelim blogs test cases #23
This file contains hidden or 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: Run Mocha Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build Docker image | |
run: docker build -t api-test . | |
- name: Run Mocha tests in Docker | |
env: | |
DEMO1_PORT: ${{ secrets.DEMO1_PORT }} | |
DEMO1_MONGO_STRING: ${{ secrets.DEMO1_MONGO_STRING }} | |
DEMO1_JWT_SECRET_KEY: ${{ secrets.DEMO1_JWT_SECRET_KEY }} | |
run: | | |
docker run \ | |
-e DEMO1_PORT=$DEMO1_PORT \ | |
-e DEMO1_MONGO_STRING=$DEMO1_MONGO_STRING \ | |
-e DEMO1_JWT_SECRET_KEY=$DEMO1_JWT_SECRET_KEY \ | |
api-test |