-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (32 loc) · 1.13 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
name: Run Tests
on:
pull_request:
push:
branches:
- develop
- main
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-373101/asia-southeast1/healthcheck)" != "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