Skip to content

Release version 0.5.0: Update versioning in pyproject.toml and __init… #38

Release version 0.5.0: Update versioning in pyproject.toml and __init…

Release version 0.5.0: Update versioning in pyproject.toml and __init… #38

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- '.github/workflows/tests.yml'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- '.github/workflows/tests.yml'
permissions:
contents: read
pull-requests: write # Required for codecov PR comments
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13", "3.12", "3.11"]
# Add serial execution to ensure delays work
max-parallel: 1
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Create results directory
run: mkdir -p pytest-results
- name: Run tests
env:
MOBILITY_API_REFRESH_TOKEN: ${{ secrets.MOBILITY_API_REFRESH_TOKEN }}
PYTHONUNBUFFERED: 1
run: |
pytest tests/ --cov=mobility_db_api --cov-report=xml --json-report --json-report-file=pytest-results/results.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: bdamokos/mobility-db-api
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: pytest-results/results.json
# Add delay between test runs
- name: Wait before next test run
if: matrix.python-version != '3.11' # Don't wait after the last version
run: sleep 30