Manage dependencies using Poetry #2055
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: Turbinia Test Run | |
on: [push, pull_request] | |
jobs: | |
install-n-test: | |
name: Install Turbinia dependencies and run tests. | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- docker_base_image: "ubuntu:22.04" | |
gift_ppa_track: "staging" | |
- docker_base_image: "ubuntu:22.04" | |
gift_ppa_track: "stable" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Pull latest docker image for cache | |
run: | | |
docker pull ${{ matrix.docker_base_image }} | |
docker pull us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-unit-tests:latest | |
- name: Build Turbinia unit test docker image | |
run: docker build --build-arg PPA_TRACK=${{ matrix.gift_ppa_track }} --cache-from=${{ matrix.docker_base_image }},us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-unit-tests:latest -t turbinia-unit-tests -f docker/tests/Dockerfile . | |
- name: Run test (turbinia-unit-tests) container | |
run: | | |
docker run --name turbinia-unit-tests --entrypoint "/bin/bash" -it -d -t turbinia-unit-tests:latest | |
- name: Configure python3 | |
run: | | |
docker exec -u root -t turbinia-unit-tests bash -c "update-alternatives --install /usr/bin/python python /usr/bin/python3 1" | |
docker exec -u root -t turbinia-unit-tests bash -c "/usr/bin/python -V" | |
- name: Run Tests | |
run: | | |
docker exec -u root -t turbinia-unit-tests bash -c "poetry run ./run_tests.py" | |
docker exec -u root -t turbinia-unit-tests bash -c "tox --sitepackages ${TOXENV}" |