migrate to uv (#553) #749
This file contains hidden or 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
# .github/workflows/test.yml | |
name: continuous-integration | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: read | |
env: | |
UV_VERSION: "0.9.x" | |
TERRAFORM_VERSION: "1.13" | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
with: | |
python-version-file: '.python-version' | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_version: ${{ env.TERRAFORM_VERSION }} | |
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
sanity: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Set up uv ${{ env.UV_VERSION }} | |
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0 | |
with: | |
version: ${{ env.UV_VERSION }} | |
activate-environment: true | |
- run: uv sync --frozen | |
- run: invoke build.build-package | |
- run: invoke sanity.validate-sdist | |
- run: invoke sanity.validate-wheel | |
ci: | |
needs: [pre-commit, sanity] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Set up uv ${{ env.UV_VERSION }} | |
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0 | |
with: | |
version: ${{ env.UV_VERSION }} | |
activate-environment: true | |
- run: uv sync --frozen | |
- run: invoke build.build-package | |
- run: invoke test.type-check | |
- run: invoke integration.clean | |
- run: invoke integration.version | |
- run: invoke integration.initialize | |
- run: invoke unit.pytest | |
- run: invoke integration.query | |
- run: invoke integration.write-policy | |
python-version: | |
needs: [pre-commit, sanity] | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: true | |
matrix: | |
python: ['3.11', '3.12', '3.13', '3.14'] | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Set up uv ${{ env.UV_VERSION }} | |
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0 | |
with: | |
version: ${{ env.UV_VERSION }} | |
python-version: ${{ matrix.python }} | |
activate-environment: true | |
- run: uv sync --frozen | |
- run: invoke build.build-package | |
- run: invoke integration.clean | |
- run: invoke integration.version | |
- run: invoke integration.initialize | |
- run: invoke unit.pytest | |
- run: invoke integration.query | |
- run: invoke integration.write-policy |