Skip to content

Commit

Permalink
Use uv in GH actions + Makefile commands where possible (#3688)
Browse files Browse the repository at this point in the history
Signed-off-by: Merel Theisen <[email protected]>
  • Loading branch information
merelcht authored Apr 18, 2024
1 parent b9e99dd commit 1b51382
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
run: |
python -m pip install "uv==0.1.32"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
uv pip install --system requests
- name: Check version
run: python tools/github_actions/github_actions_release.py
- name: Set outputs
Expand Down Expand Up @@ -48,10 +50,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
run: |
python -m pip install "uv==0.1.32"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
uv pip install --system build
- name: Build package
run: make package
- name: Extract release notes from RELEASE.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
make install-test-requirements
pip install -U .[test]
make install-pre-commit
- name: pip freeze
run: pip freeze
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
make install-test-requirements
make install-pre-commit
- name: pip freeze
run: pip freeze
run: uv pip freeze --system
- name: Run linter
run: make lint
2 changes: 1 addition & 1 deletion .github/workflows/pip-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
run: |
make install-test-requirements
make install-pre-commit
pip install "pip-tools>=6.5"
uv pip install --system "pip-tools>=6.5"
- name: Run pip-compile
run: make pip-compile
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
make install-test-requirements
make install-pre-commit
- name: pip freeze
run: pip freeze
run: uv pip freeze --system
- name: Run unit tests
run: make test
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install:
pip install -e .
uv pip install --system -e .

clean:
rm -rf build dist docs/build kedro/html pip-wheel-metadata .mypy_cache .pytest_cache features/steps/test_plugin/test_plugin.egg-info
Expand Down Expand Up @@ -31,22 +31,22 @@ secret-scan:
trufflehog --max_depth 1 --exclude_paths trufflehog-ignore.txt .

build-docs:
pip install -e ".[docs]"
uv pip install --system -e ".[docs]"
./docs/build-docs.sh "docs"

show-docs:
open docs/build/html/index.html

linkcheck:
pip install -e ".[docs]"
uv pip install --system "kedro[docs] @ ."
./docs/build-docs.sh "linkcheck"

package: clean install
python -m pip install build && python -m build

install-test-requirements:
python -m pip install -U "pip>=21.2"
pip install -U .[test]
python -m pip install "uv==0.1.32"
uv pip install --system "kedro[test] @ ."

install-pre-commit:
pre-commit install --install-hooks
Expand Down

0 comments on commit 1b51382

Please sign in to comment.