Implement VERSION_CHECK configuration setting. (#1347) #2012
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-worker-dev:latest | |
- name: Build Turbinia worker 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-worker-dev:latest -t turbinia-worker-dev -f docker/worker/Dockerfile . | |
- name: Run test (turbinia-worker) container | |
run: | | |
docker run --name turbinia-worker --entrypoint "/bin/bash" -it -d -t turbinia-worker-dev:latest | |
- name: Configure python3 | |
run: | | |
docker exec -u root -t turbinia-worker bash -c "update-alternatives --install /usr/bin/python python /usr/bin/python3 1" | |
docker exec -u root -t turbinia-worker bash -c "/usr/bin/python -V" | |
- name: Install and configure test dependencies | |
run: | | |
docker exec -u root -t turbinia-worker bash -c "/usr/bin/python -m pip install --quiet --upgrade pip" | |
docker exec -u root -t turbinia-worker bash -c "/usr/bin/python -m pip install --quiet mock nose coverage yapf" | |
docker exec -u root -t turbinia-worker bash -c "/usr/bin/python -m pip install --quiet tox" | |
- name: Run Tests | |
run: | | |
docker exec -u root -t turbinia-worker bash -c "cd /tmp && ./run_tests.py" | |
docker exec -u root -t turbinia-worker bash -c "cd /tmp && tox --sitepackages ${TOXENV}" |