Skip to content

Commit

Permalink
ci: Add uv action
Browse files Browse the repository at this point in the history
A good chunk of time is spent installing packages. UV is blisteringly
fast in this regard.
  • Loading branch information
techman83 committed Dec 1, 2024
1 parent 6da0f0a commit 9e6b4fa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/coverage-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
coverage-build:
runs-on: ubuntu-latest
needs: build-providers
env:
UV_SYSTEM_PYTHON: true
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v3
Expand All @@ -23,15 +25,16 @@ jobs:
with:
python-version: "3.11"
cache: pip
- uses: yezz123/setup-uv@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
- name: Export Terraform Path
run: echo "CALLY_TERRAFORM_PATH=$(which terraform)" >> $GITHUB_ENV
- name: Install Provider Pacakges
run: pip install build/**/*.tar.gz
run: uv pip install build/**/*.tar.gz
- name: Install Cally test dependencies
run: pip install .[test]
run: uv pip install .[test]
- name: Run Coverage
run: |
coverage run -m pytest
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test-cally.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
strategy:
matrix:
python: ["3.11"]
env:
UV_SYSTEM_PYTHON: true
steps:
# Restore Provider Packages
- uses: actions/checkout@v4
Expand All @@ -30,10 +32,11 @@ jobs:
with:
python-version: ${{ matrix.python }}
cache: pip
- uses: yezz123/setup-uv@v4
- name: Install Provider Pacakges
run: pip install build/**/*.tar.gz
run: uv pip install build/**/*.tar.gz
- name: Install Cally test dependencies
run: pip install .[test]
run: uv pip install .[test]

# Run Tests
- name: Run Pytest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
strategy:
matrix:
project: ["minimal", "opinionated"]
env:
UV_SYSTEM_PYTHON: true
steps:
# Restore Provider Packages
- uses: actions/checkout@v4
Expand All @@ -29,10 +31,11 @@ jobs:
with:
python-version: "3.11"
cache: pip
- uses: yezz123/setup-uv@v4
- name: Install Provider Pacakges
run: pip install build/**/*.tar.gz
run: uv pip install build/**/*.tar.gz
- name: Install Cally
run: pip install .
run: uv pip install .

# IDP Install
- uses: actions/checkout@v4
Expand All @@ -41,7 +44,7 @@ jobs:
path: examples
- name: Install ${{ matrix.project }}
working-directory: examples/${{ matrix.project }}
run: pip install .[test]
run: uv pip install .[test]

# Run Tests
- name: Run Pytest for ${{ matrix.project }}
Expand Down

0 comments on commit 9e6b4fa

Please sign in to comment.