Skip to content

Commit

Permalink
Lint with tox-dev/action-pre-commit-uv, test with uvx+tox-uv
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 31, 2024
1 parent 108c3b5 commit 791722a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

permissions:
contents: read

jobs:
pre-commit:
lint:
runs-on: ubuntu-latest

steps:
Expand All @@ -20,8 +19,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- uses: pre-commit/action@v3.0.1
- uses: tox-dev/action-pre-commit-uv@v1

mypy:
runs-on: ubuntu-latest
Expand All @@ -33,8 +31,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- name: Install dependencies
run: python3 -m pip install -U tox
- name: Install uv
uses: hynek/setup-cached-uv@v2
- name: Mypy
run: tox -e mypy
run: uvx --with tox-uv tox -e mypy
9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ permissions:

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

jobs:
test:
Expand All @@ -32,18 +31,14 @@ jobs:
- name: Install uv
uses: hynek/setup-cached-uv@v2

- name: Install dependencies
run: |
uv pip install --system -U tox-uv
- name: Tox tests
run: |
tox -e py
uvx --with tox-uv tox -e py
- name: Cog
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
run: |
tox -e cog
uvx --with tox-uv tox -e cog
- name: Upload coverage
uses: codecov/codecov-action@v3.1.5
Expand Down

0 comments on commit 791722a

Please sign in to comment.