Skip to content

Commit 0d3fa4a

Browse files
committed
Add tox github action
1 parent a183d91 commit 0d3fa4a

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/run_tox.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
concurrency:
2+
group: check-${{ github.ref }}
3+
cancel-in-progress: true
4+
jobs:
5+
test:
6+
name: test with ${{ matrix.env }} on ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
env:
12+
- "3.13"
13+
os:
14+
- ubuntu-latest
15+
- macos-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install the latest version of uv
19+
uses: astral-sh/setup-uv@v5
20+
- name: Install tox
21+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh
22+
- name: Install Python
23+
if: matrix.env != '3.13'
24+
run: uv python install --python-preference only-managed ${{ matrix.env }}
25+
- name: Setup test suite
26+
run: tox run -vv --notest --skip-missing-interpreters false
27+
env:
28+
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
29+
- name: Run test suite
30+
run: tox run --skip-pkg-install
31+
env:
32+
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
33+
name: run tox
34+
on:
35+
workflow_dispatch:
36+
push:
37+
branches: ["main"]
38+
pull_request:

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,7 @@ commands = [["pyright"]]
132132
dependency_groups = ["type"]
133133
description = "run type check on code base"
134134
runner = "uv-venv-lock-runner"
135+
136+
137+
[tool.tox.gh.python]
138+
"3.13" = ["3.13", "lint", "type"]

0 commit comments

Comments
 (0)