Enhance CI UV usage #83
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: build | |
on: | |
push: | |
pull_request: | |
jobs: | |
ci-test-matrix: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: "Run tests on ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
# get the week of the year (1-52) for nice cache control | |
- name: set .weeknum.txt | |
run: /bin/date -u "+%U" > .weeknum.txt | |
shell: bash | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: ".weeknum.txt" | |
- name: install pythons | |
run: uv python install 3.8 3.9 3.10 3.11 3.12 3.13 | |
- run: uv tool install tox --with tox-uv | |
- name: test | |
run: tox run -m ci | |
other-tox-checks: | |
strategy: | |
matrix: | |
include: | |
- pythons: ["3.8", "3.13"] | |
tox_label: "ci-mypy" | |
- pythons: ["3.13"] | |
tox_label: "ci-package-check" | |
runs-on: ubuntu-latest | |
name: "Run '${{ matrix.tox_label }}'" | |
steps: | |
- uses: actions/checkout@v4 | |
# get the week of the year (1-52) for nice cache control | |
- name: set .weeknum.txt | |
run: /bin/date -u "+%U" > .weeknum.txt | |
shell: bash | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: ".weeknum.txt" | |
- name: install pythons | |
run: uv python install ${{ join( matrix.pythons, ' ') }} | |
- run: uv tool install tox --with tox-uv | |
- run: tox run -m "${{ matrix.tox_label }}" |