Skip to content

⬆ Bump the production-dependencies group across 1 directory with 14 updates #284

⬆ Bump the production-dependencies group across 1 directory with 14 updates

⬆ Bump the production-dependencies group across 1 directory with 14 updates #284

Workflow file for this run

name: Python tests
on:
push:
branches: [dev]
pull_request:
branches: [main, dev]
defaults:
run:
working-directory: ./backend
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install poetry
uses: abatilo/actions-poetry@v3
- name: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v4
with:
path: ./backend/.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
run: poetry install
- name: Run Tests
run: poetry run pytest -- --cov-report=xml
- name: Save coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report-backend
path: ./backend/coverage.xml
coverage:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: coverage-report-backend
path: ./backend
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./backend/coverage.xml
flags: backend