Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
setup gcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
dudizimber committed Jul 3, 2024
1 parent 5796a88 commit a4d7574
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Run tests

on:
Expand All @@ -7,14 +6,17 @@ on:

jobs:
test:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x # Update with desired Python version
python-version: 3.x # Update with desired Python version

- name: Cache Poetry virtualenv
id: cache
Expand All @@ -25,6 +27,17 @@ jobs:
restore-keys: |
${{ runner.os }}-poetry-
- id: "auth"
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}

- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
with:
version: ">= 363.0.0"

- name: Install Poetry
if: steps.cache.outputs.cache-hit != true
run: |
Expand All @@ -34,4 +47,8 @@ jobs:
run: poetry install

- name: Run tests
run: poetry run pytest
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
REGION: ${{ vars.REGION }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: poetry run pytest

0 comments on commit a4d7574

Please sign in to comment.