Skip to content

Docker tweaks

Docker tweaks #373

Workflow file for this run

name: test
on:
push:
branches:
- master
pull_request:
jobs:
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
lfs: true
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Cache virtualenv
uses: actions/cache@v3
id: cache-pip
with:
path: venv
key: venv-${{ hashFiles('requirements.txt') }}-0.4.1-0.1.0
- name: Install dependencies in a venv
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
python3 -m venv venv
. venv/bin/activate
pip install -q -U pip
pip install --progress-bar=off -r requirements.txt
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker build
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: covid19:latest
- name: Check docker image
run: |
echo "######## DOCKER IMAGES ########"
docker images
# ensure image is actually present before moving on
docker image inspect covid19:latest && echo "--- image built and loaded"
echo "######## DOCKER IMAGES ########"
- name: Run lint checks & tests
run: |
. venv/bin/activate
make test
- name: Upload Report PDFs
uses: actions/upload-artifact@v2
with:
name: example reports
path: report-*.pdf