Add integration tests #4
Workflow file for this run
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 integration tests | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- server/** | |
- client/** | |
- tests/** | |
- .github/workflows/run_integration_tests.yaml | |
pull_request: | |
branches: [ main ] | |
paths: | |
- server/** | |
- client/** | |
- tests/** | |
- .github/workflows/run_integration_tests.yaml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: [self-hosted, linux, large, jammy, x64] | |
defaults: | |
run: | |
working-directory: tests | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build and run integration tests | |
run: | | |
cd integration | |
docker compose up --build --abort-on-container-exit | |
exit_code=$? | |
docker compose logs | |
docker compose down | |
exit $exit_code | |
- name: Print container logs on failure | |
if: failure() | |
run: | | |
cd integration | |
docker compose logs hwapi-integration | |
docker compose logs integration-tests |