unit tests [multiversion] #76
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: unit tests [multiversion] | |
on: | |
schedule: | |
- cron: '0 1 * * 1' | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
pyproject.toml | |
env: | |
UV_SYSTEM_PYTHON: true | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
# Using matrix strategy | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
# Check out repo and set up Python | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# 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 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install package | |
run: | | |
uv pip install ".[dev]" | |
- name: Run tests on python ${{matrix.python-version}} | |
run: | | |
pytest --full-trace --show-capture=no -sv -n auto tests/ |