jakob-keller is testing peprock π #1065
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
run-name: ${{ github.actor }} is testing peprock π | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "3.10", "3.11", "3.12", "3.13" ] | |
env: | |
PYTHON: ${{ matrix.python-version }} | |
UV_PYTHON_PREFERENCE: only-system | |
UV_LOCKED: 1 | |
steps: | |
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
version: "0.5.7" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Check code formatting | |
run: uv run ruff format --check | |
- name: Run linter | |
run: uv run ruff check | |
- name: Run type checker | |
run: uv run mypy | |
- name: Run unit tests | |
run: uv run pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
env_vars: PYTHON | |
files: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: PYTHON | |
- run: echo "π This job's status is ${{ job.status }}." |