tested and worked with mongo (fine on existing instance) #126
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: Run Tests | |
on: | |
pull_request: | |
push: { branches: master } | |
jobs: | |
test: | |
name: Run Angles unit/integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: "Setup Node.js" | |
uses: "actions/setup-node@v4" | |
with: | |
node-version: 16 | |
- name: Run docker-compose | |
uses: hoverkraft-tech/[email protected] | |
with: | |
compose-file: "./test/test-setup/docker-compose.yml" | |
- name: Install mocha | |
run: npm install mocha | |
- name: Trigger tests | |
run: MONGO_URL='mongodb://angleshq:%[email protected]:27017/angles' npm run test-with-reporter | |
- name: Modify mocha results (due to bug) | |
run: grep -v '{"level":30' test-results.json >> modified-results.json | |
- name: Generate test report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: Generate Mocha Tests results | |
path: modified-results.json | |
reporter: mocha-json |