Add actions/checkout@v4 step to the test CI workflow before creating the virtual environment, and update pyproject.toml version to 1.39.0 with corresponding CHANGELOG entry documenting the virtual environment test isolation improvement.
36 lines
830 B
YAML
36 lines
830 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, develop ]
|
|
pull_request:
|
|
branches: [ master, develop ]
|
|
|
|
jobs:
|
|
test:
|
|
env:
|
|
PIP_BREAK_SYSTEM_PACKAGES: 1
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Create virtual environment
|
|
run: |
|
|
python -m venv venv
|
|
. venv/bin/activate
|
|
- name: Install dependencies
|
|
run: |
|
|
venv/bin/python3 -m pip install --upgrade pip
|
|
venv/bin/python3 -m pip install -e ".[dev]"
|
|
|
|
- name: Run tests with pytest
|
|
run: |
|
|
venv/bin/pytest --cov=pr --cov-report=xml --cov-report=term-missing
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
file: ./coverage.xml
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: false
|