Skip to content

Commit

Permalink
Use environment variables to remove duplication in uv commands
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtheturtle committed Oct 8, 2024
1 parent ffe4c3c commit ee4f9e1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ jobs:

- name: "Lint"
run: |
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-commit --verbose
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage pre-push --verbose
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage pre-commit --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage pre-push --verbose
uv run --extra=dev pre-commit run --all-files --hook-stage manual --verbose
env:
UV_PYTHON: ${{ matrix.python-version }}

- name: "Run tests"
run: |
# We run tests against "." and not the tests directory as we test the README
# and documentation.
uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml
uv run --extra=dev pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml
env:
UV_PYTHON: ${{ matrix.python-version }}

- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v4"
Expand Down

0 comments on commit ee4f9e1

Please sign in to comment.