Skip to content

Integration test CI

Integration test CI #3

Workflow file for this run

name: Unit and Integration Tests
on:
push: {}
pull_request:
branches: [main]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# We could choose to set up dependencies manually in the GHA runner instead of installing them during the GHA.
#
# However, I think it's better to do them in the GHA itself so that we're testing our dependency installation step
# in addition to our actual code. It also removes the need to manually reinstall dependencies on the GHA runners
# every time we add a new dependency.
#
# Note that the GHA runners are stateful. Dependencies installed from previous runs will still be on the runner.
# This means this step will usually be pretty fast as most dependencies will already be cached. However, it also
# means that past runs might interfere with the current run, so you sometimes may need to restart the GHA runners.
- name: Install dependencies
run: |
./dependencies/install_dependencies.sh
. "$HOME/.cargo/env"
cargo -v
- name: Run unit tests
run: python scripts/run_unit_tests.py
- name: Run integration test
# Delete the workspace. Run once with a clean workspace. Run again from the existing workspace.
run: |
cargo -v
rm -rf ../dbgym_integtest_workspace
./scripts/integration_test.sh
./scripts/integration_test.sh