Skip to content

Pip package for tutorial-vm #8

Pip package for tutorial-vm

Pip package for tutorial-vm #8

name: Build and Test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
id: auth
run: |
gcloud auth login --brief
env:
GCP_WORKLOAD_IDENTITY_PROVIDER: projects/${{ secrets.GCP_PROJECT_ID }}/locations/global/workloadIdentityPools/${{ secrets.GCP_POOL_ID }}/providers/${{ secrets.GCP_PROVIDER_ID }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --editable .[dev]
- name: Build package
run: |
python -m build
twine check dist/*
- name: Install package
run: |
pip install dist/*.whl
- name: Run tests
run: |
pytest tests/