Update python and move package to uv #330
Workflow file for this run
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: pytest and coverage report | |
# Triggers the workflow on push for all branches and PR only for main | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
pyproject.toml | |
pull_request: | |
branches: | |
- main | |
env: | |
UV_SYSTEM_PYTHON: true | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out repo and set up Python | |
- uses: actions/checkout@v4 | |
# see https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions and https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key | |
- name: Fetch test data | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.TEST_DATA_ACCESS_KEY }}' | |
git submodule sync --recursive | |
git submodule update --init --recursive --jobs=4 | |
# Setup python | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install package | |
run: | | |
uv pip install ".[dev]" | |
# Run pytest with coverage report, saving to xml | |
- name: Run tests on python 3.8 | |
run: | | |
pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/ | |
# Take report and upload to coveralls | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./cobertura.xml |