Skip to content

Commit

Permalink
Add a simple example too (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Oct 10, 2024
1 parent 3ce50e6 commit 7ebfab3
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,42 @@ This will run a different set of tox environments on different python versions s

#### Workflow Configuration

`.github/workflows/check.yaml`:
A bare-bones example would be `.github/workflows/check.yaml`:

```yaml
jobs:
test:
name: test with ${{ matrix.env }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
env:
- "3.13"
- "3.12"
os:
- ubuntu-latest
- macos-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh
- name: Install Python
if: matrix.env != '3.13'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
- name: Run test suite
run: tox run --skip-pkg-install
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
```
A more exhaustive example would be `.github/workflows/check.yaml`:

```yaml
name: check
Expand Down

0 comments on commit 7ebfab3

Please sign in to comment.