Skip to content

add the prod on the gha #854

add the prod on the gha

add the prod on the gha #854

name: Unit tests
on:
push:
branches:
- "main"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.12" # matches current Python in production
- name: "Run Python tests (on Docker)"
run: |
bin/dc.sh build --pull web
bin/dc.sh build builder
bin/dc.sh run test-image
CONTAINER_ID=$(docker ps -alq)
docker cp $CONTAINER_ID:/app/python_coverage .
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
with:
files: python_coverage/coverage.xml
verbose: true # optional (default = false)