Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix CI #650

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv

- run: python -Im tox run --installpkg dist/*.whl -f py$(echo ${{ matrix.python-version }} | tr -d .)
- run: >
uvx --with=tox-uv
tox run
--installpkg dist/*.whl
-f py$(echo ${{ matrix.python-version }} | tr -d .)

- name: Upload coverage data
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -82,14 +85,16 @@ jobs:

- name: Combine coverage & fail if it's <100%.
run: |
python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty
uv tool install 'coverage[toml]'

coverage combine
coverage html --skip-covered --skip-empty

# Report and write to summary.
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

# Report again and fail if under 100%.
python -Im coverage report --fail-under=100
coverage report --fail-under=100

- name: Upload HTML report if check failed.
uses: actions/upload-artifact@v4
Expand All @@ -115,9 +120,12 @@ jobs:
python-version-file: .python-version-default
allow-prereleases: true
- uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv

- run: python -Im tox run --installpkg dist/*.whl -e mypy-pkg
- run: >
uvx --with=tox-uv
tox run
--installpkg dist/*.whl
-e mypy-pkg

pyright:
name: Pyright
Expand All @@ -136,9 +144,12 @@ jobs:
python-version-file: .python-version-default
allow-prereleases: true
- uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv

- run: python -Im tox run --installpkg dist/*.whl -e pyright
- run: >
uvx --with=tox-uv
tox run
--installpkg dist/*.whl
-e pyright

docs:
name: Build docs & run doctests
Expand All @@ -156,9 +167,11 @@ jobs:
# Keep in sync with tox.ini/docs & .readthedocs.yaml
python-version: "3.12"
- uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv

- run: python -Im tox run -e docs
- run: >
uvx --with=tox-uv
tox run
-e docs

install-dev:
name: Verify dev env
Expand Down Expand Up @@ -212,6 +225,8 @@ jobs:
with:
python-version-file: .python-version-default
- uses: hynek/setup-cached-uv@v2
- run: uv pip install --system tox-uv

- run: python -Im tox run -f color
- run: >
uvx --with=tox-uv
tox run
-f color