-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (34 loc) · 1.1 KB
/
run_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Run Tests
on:
pull_request:
push: { branches: master }
jobs:
test:
name: Run Angles unit/integration tests
runs-on: ubuntu-latest
env:
COMPOSE_FILE: ./test/test-setup/docker-compose.yml
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: "actions/setup-node@v3"
with:
node-version: 16
- name: "Install docker-compose"
run: sudo pip3 install docker-compose
- name: Setup Angles Mongo instance
run: docker-compose up -d
- 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