Skip to content

Move pytest configuration to pyproject.toml #854

Move pytest configuration to pyproject.toml

Move pytest configuration to pyproject.toml #854

Workflow file for this run

name: Python package
on:
push:
branches: [master]
pull_request:
jobs:
linting:
name: Run linting/pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.25"
python-version: '3.11'
- run: uvx pre-commit --version
- run: uvx pre-commit run --all-files
build:
needs: [linting]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.25"
python-version: ${{ matrix.python-version }}
- name: Install the project (no extras)
run: uv sync
- name: Unit tests with Pytest (no extras)
timeout-minutes: 3
run: |
uv run pytest --benchmark-disable --cov=simple_parsing --cov-report=xml --cov-append
- name: Install extra dependencies
run: uv sync --all-extras
- name: Unit tests with Pytest (with extra dependencies)
timeout-minutes: 3
run: |
uv run pytest --benchmark-disable --cov=simple_parsing --cov-report=xml --cov-append
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
env_vars: PLATFORM,PYTHON
name: codecov-umbrella
fail_ci_if_error: false