Skip to content

pytesting

pytesting #18

Workflow file for this run

name: Build Prod and PyTest
on:
pull_request:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t prod -f .deployment/prod.Dockerfile .
- name: Create Docker container with pytest.ini
run: |
docker create --name temp_container prod
docker cp pytest.ini temp_container:/
docker commit temp_container prod:with_pytest_ini
- name: Run tests (override entrypoint to run tests rather than deploy)
run: |
docker run \
--entrypoint /bin/bash \
-v ${{ github.workspace }}/tests:/tests \
prod:with_pytest_ini \
-c "conda run -n burn-severity-prod pytest -svv /tests"