Use venv #6366
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
name: Build and test | |
permissions: | |
contents: read | |
id-token: write | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '37 22 * * *' | |
jobs: | |
gha: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, ubuntu-24.04, windows-latest, macos-13] | |
python-version: ["3.12"] | |
steps: | |
# actions/checkout MUST come before auth | |
- uses: actions/checkout@v3 | |
- id: auth | |
name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v1 | |
with: | |
workload_identity_provider: projects/318417991012/locations/global/workloadIdentityPools/gha-pool/providers/gha-provider | |
service_account: [email protected] | |
token_format: access_token | |
- name: Python packages | |
run: | | |
python3 -m venv myvenv | |
myvenv/bin/pip3 install google-auth requests | |
- name: USE GOOGLE SERVICES | |
run: | | |
myvenv/bin/python3 src/test.py |