Add gitea workflow to run offline tests
Some checks failed
Run Unit Tests / test-package (3.13) (push) Failing after 26s
Run Unit Tests / test-package (3.11) (push) Failing after 30s
Run Unit Tests / test-package (3.12) (push) Failing after 28s

This commit is contained in:
Adam Goldsmith 2024-12-05 13:54:41 -05:00
parent 2869b181c6
commit 3364a3e0ee

33
.gitea/workflows/test.yml Normal file
View File

@ -0,0 +1,33 @@
name: Run Unit Tests
on:
push:
jobs:
test-package:
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
env:
# workaround for container tool cache path, see https://gitea.com/gitea/act_runner/issues/70
RUNNER_TOOL_CACHE: /toolcache
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
# For example, using `pytest`
run: uv run pytest tests