Skip to content

koxudaxi is testing the package #2121

koxudaxi is testing the package

koxudaxi is testing the package #2121

Workflow file for this run

name: tests
run-name: ${{ github.actor }} is testing the package
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.3.0/install.sh | sh
- name: Set up Python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
echo "${{ matrix.python-version }}" > .python-version
- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Run Tests
run: uv run pytest tests/ --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
directory: ./
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml,!./cache
flags: tests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Minimize uv cache
run: uv cache prune --ci