-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 1.2 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
name: Run Tests
on:
pull_request:
paths-ignore:
- "README.md"
push:
branches:
- develop
- main
paths-ignore:
- "README.md"
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: docker compose -f docker-compose-base.yml build --no-cache
- name: Run unit tests
run: docker run checkmate-emulator:latest npm test
- name: Start docker compose for testing
run: docker compose -f docker-compose-base.yml up -d
- name: Wait for emulator to start
run: timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:15001/checkmate-uat/asia-southeast1/healthcheckV2)" != "200" ]]; do sleep 1; done' || false
- name: Install newman and lodash
run: npm ci
working-directory: integration-tests
- name: Update environment file with latest wordings
run: npm run update-env
working-directory: integration-tests
- name: Run postman tests
run: npm run test
working-directory: integration-tests
- name: Print docker compose logs
if: success() || failure()
run: docker compose logs