Skip to content

Build and test

Build and test #6392

Workflow file for this run

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:
- macos-12
- macos-13
- macos-14
- macos-latest
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- ubuntu-latest
- windows-2019
- windows-2022
- windows-latest
steps:
# actions/checkout MUST come before auth
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- id: uname
name: Run uname command
run: |
uname -a
- id: set-cmd
name: Run set command
run: |
set
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/318417991012/locations/global/workloadIdentityPools/gha-pool/providers/gha-provider
service_account: [email protected]
token_format: access_token
- name: Configure Python venv
run: |
python3 -m venv myvenv
if [[ "${RUNNER_OS}" == "Windows" ]]; then
myvenv/Scripts/activate
python="python3"
else
python="myvenv/bin/python3"
fi
echo "python=${python}" >> $GITHUB_ENV
- name: Install pip packages
run: |
$python -m pip install google-auth requests
- name: USE GOOGLE SERVICES
run: |
$python src/test.py