Skip to content

Merge pull request #169 from CheckMateSG/feat/firebase-emulator-persi… #272

Merge pull request #169 from CheckMateSG/feat/firebase-emulator-persi…

Merge pull request #169 from CheckMateSG/feat/firebase-emulator-persi… #272

Workflow file for this run

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