@@ -21,51 +21,55 @@ jobs:
2121 fail-fast : false
2222 matrix :
2323 include :
24- - { python: "3.11"}
25- - { python: "3.12"}
26- - { python: "3.13"}
24+ - { python: "3.11" }
25+ - { python: "3.12" }
26+ - { python: "3.13" }
2727 steps :
28- - name : Checkout Repository
29- uses : actions/checkout@v4
30- - id : " auth"
31- name : " Authenticate to Google Cloud"
32- uses : " google-github-actions/auth@v2.1.3"
33- with :
34- workload_identity_provider : ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
35- service_account : ${{ secrets.INTEGRATION_TEST_SA_EMAIL }}
36- token_format : " access_token"
37- - name : ' Set up Cloud SDK'
38- uses : ' google-github-actions/setup-gcloud@v2'
39- with :
40- version : ' >= 363.0.0'
41- - name : Generate, mask, and output Google ID token as a secret
42- id : get-id-token
43- env :
44- PRIVILEGED_SERVICE_ACCOUNT : ${{ secrets.INTEGRATION_TEST_PRIV_SA_EMAIL }}
45- run : |
46- # REQUIRED TO KEEP GH ACTIONS FOR LOGGING THE ID TOKEN
47- # SEE: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-masking-a-generated-output-within-a-single-job
48- pseudo_service_auth_token="$(gcloud auth print-identity-token --impersonate-service-account=$PRIVILEGED_SERVICE_ACCOUNT --audiences=$PSEUDO_SERVICE_URL --include-email)"
49- echo "::add-mask::$pseudo_service_auth_token"
50- echo "PSEUDO_SERVICE_AUTH_TOKEN=$pseudo_service_auth_token" >> "$GITHUB_OUTPUT"
51- - name : Setup python
52- uses : actions/setup-python@v5
53- with :
54- python-version : ${{ matrix.python }}
28+ - name : Checkout Repository
29+ uses : actions/checkout@v4
30+ - id : " auth"
31+ name : " Authenticate to Google Cloud"
32+ uses : " google-github-actions/auth@v2.1.3"
33+ with :
34+ workload_identity_provider : ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
35+ service_account : ${{ secrets.INTEGRATION_TEST_SA_EMAIL }}
36+ token_format : " access_token"
37+ - name : " Set up Cloud SDK"
38+ uses : " google-github-actions/setup-gcloud@v2"
39+ with :
40+ version : " >= 363.0.0"
41+ - name : Generate, mask, and output Google ID token as a secret
42+ id : get-id-token
43+ env :
44+ PRIVILEGED_SERVICE_ACCOUNT : ${{ secrets.INTEGRATION_TEST_PRIV_SA_EMAIL }}
45+ run : |
46+ # REQUIRED TO KEEP GH ACTIONS FOR LOGGING THE ID TOKEN
47+ # SEE: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-masking-a-generated-output-within-a-single-job
48+ pseudo_service_auth_token="$(gcloud auth print-identity-token --impersonate-service-account=$PRIVILEGED_SERVICE_ACCOUNT --audiences=$PSEUDO_SERVICE_URL --include-email)"
49+ echo "::add-mask::$pseudo_service_auth_token"
50+ echo "PSEUDO_SERVICE_AUTH_TOKEN=$pseudo_service_auth_token" >> "$GITHUB_OUTPUT"
51+ - name : Setup python
52+ uses : actions/setup-python@v5
53+ with :
54+ python-version : ${{ matrix.python }}
5555
56- - name : Install Poetry
57- run : |
58- pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry
59- pipx inject poetry poetry-plugin-export
60- poetry --version
56+ - name : Get uv version from constraints
57+ id : uv-version
58+ shell : pwsh
59+ run : |
60+ $UV_VERSION = (Get-Content .github/workflows/constraints.txt | Where-Object { $_ -match '^uv==' } | ForEach-Object { ($_ -split '==')[1] })
61+ echo "version=$UV_VERSION" >> $env:GITHUB_OUTPUT
6162
62- - name : Install Nox
63- run : |
64- pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox
65- pipx inject --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry
66- nox --version
63+ - name : Install uv
64+ uses : astral-sh/setup-uv@v7
65+ with :
66+ enable-cache : true
67+ version : " ${{ steps.uv-version.outputs.version }}"
68+ python-version : " ${{ matrix.python }}"
6769
68- - name : Integration test
69- env :
70- PSEUDO_SERVICE_AUTH_TOKEN : ${{ steps.get-id-token.outputs.PSEUDO_SERVICE_AUTH_TOKEN }}
71- run : nox --python=${{ matrix.python }} --session tests -- tests/v1/integration
70+ - name : Integration test
71+ env :
72+ PSEUDO_SERVICE_AUTH_TOKEN : ${{ steps.get-id-token.outputs.PSEUDO_SERVICE_AUTH_TOKEN }}
73+ run : |
74+ uvx --constraints "${{ github.workspace }}/.github/workflows/constraints.txt" \
75+ nox --python="${{ matrix.python }}" --session tests -- tests/v1/integration
0 commit comments