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 f7dea81 commit bd2713e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ 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"
env:
Expand All @@ -42,10 +44,11 @@ jobs:
COV_CORE_CONFIG: .coveragerc
COV_CORE_SOURCE: src
COV_CORE_DATAFILE: .coverage.eager
UV_PYTHON: ${{ matrix.python-version }}
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
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v4"
Expand Down

0 comments on commit bd2713e

Please sign in to comment.