-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 Refactor CI workflow to use setup-uv action
- Loading branch information
Showing
2 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,17 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: pip install -e .[lint] | ||
- uses: pre-commit/[email protected] | ||
|
||
- name: setup uv | ||
uses: yezz123/setup-uv@v4 | ||
with: | ||
extra_args: --all-files --verbose | ||
- name: Run mypy | ||
run: bash scripts/lint.sh | ||
uv-venv: ".venv" | ||
|
||
- name: Install Dependencies | ||
run: uv pip install -r requirements/pyproject.txt && uv pip install -r requirements/linting.txt | ||
|
||
- name: Run Pre-commit | ||
run: bash scripts/format.sh | ||
|
||
tests: | ||
|
||
|
@@ -51,17 +55,27 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: setup UV | ||
uses: yezz123/setup-uv@v4 | ||
with: | ||
uv-venv: ".venv" | ||
|
||
- name: Install Dependencies | ||
run: pip install -e .[test] | ||
run: uv pip install -r requirements/pyproject.txt && uv pip install -r requirements/testing.txt | ||
|
||
- name: Freeze Dependencies | ||
run: pip freeze | ||
run: uv pip freeze | ||
|
||
- name: Test with pytest | ||
- name: Test with pytest - ${{ matrix.os }} - py${{ matrix.python-version }} | ||
run: bash scripts/test.sh | ||
env: | ||
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-with-deps | ||
|
||
- name: Upload coverage | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
|
||
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks | ||
check: | ||
|
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