# This workflow will install Python dependencies, run tests and lint # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Test on: push: branches: [main] pull_request: branches: [main] jobs: pre-commit: runs-on: ubuntu-latest steps: - name: Check out the repository uses: actions/checkout@v6.0.2 - name: Set up Python 3.14 uses: actions/setup-python@v6.2.0 with: python-version: "3.14" - name: Install dependencies run: | python -m venv venv . venv/bin/activate python --version pip install uv uv pip install -r requirements_dev.txt -e . - name: Run pre-commit run: | . venv/bin/activate pre-commit run --all-files --show-diff-on-failure pytest: name: pytest ${{ matrix.python-version }} runs-on: ubuntu-latest needs: pre-commit strategy: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Check out the repository uses: actions/checkout@v6.0.2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m venv venv . venv/bin/activate python --version pip install uv uv pip install -r requirements_dev.txt -e . - name: Run tests run: | . venv/bin/activate pytest tests --cov=aiopegelonline --cov-report=xml codecov: name: codecov runs-on: ubuntu-latest needs: pytest steps: - name: Check out the repository uses: actions/checkout@v6.0.2 - name: Set up Python 3.14 uses: actions/setup-python@v6.2.0 with: python-version: "3.14" - name: Install dependencies run: | python -m venv venv . venv/bin/activate python --version pip install uv uv pip install -r requirements_dev.txt -e . - name: Run tests run: | . venv/bin/activate pytest tests --cov=aiopegelonline --cov-report=xml - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v6 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}