refactor: use dependency groups #757
Workflow file for this run
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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 3 # "3" -> "256-bit color". | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
value: | |
- name: "3.8" | |
python-version: "3.8" | |
extra-install: "" | |
- name: "3.9" | |
python-version: "3.9" | |
extra-install: "" | |
- name: "3.10" | |
python-version: "3.10" | |
extra-install: "" | |
- name: "3.11" | |
python-version: "3.11" | |
extra-install: "" | |
- name: "3.11-pre-beartype" | |
python-version: "3.11" | |
extra-install: "uv pip install --upgrade --pre beartype" | |
name: Test ${{ matrix.value.name }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Set up Python ${{ matrix.value.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
uv sync --group dev | |
${{ matrix.value.extra-install }} | |
- name: Test linter assertions | |
run: | | |
python check_linter_assertions.py tests/typechecked | |
- name: Run tests | |
run: | | |
PRAGMA_VERSION=`python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))"` \ | |
uv run pytest -v --cov=plum --cov-report term-missing | |
- name: Coveralls parallel | |
uses: coverallsapp/github-action@v2 | |
with: | |
flag-name: run-${{ matrix.value.name }} | |
parallel: true | |
finish: | |
name: Finish coverage | |
needs: test | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls finished | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true |