-
Notifications
You must be signed in to change notification settings - Fork 6
58 lines (48 loc) · 1.71 KB
/
bigquery.yml
File metadata and controls
58 lines (48 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Simple workflow for deploying static content to GitHub Pages
name: Run BigQuery snippets as a test
on:
push:
paths-ignore:
- ".gitignore"
branches:
- main
pull_request_target:
types:
- labeled
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.label.name == 'ci-run-cloud'
# Add "id-token" with the intended permissions.
permissions:
contents: 'read'
# required for GCP workload identity federation
id-token: 'write'
steps:
- name: checkout
uses: actions/checkout@v4
if: github.event.label.name != 'ci-run-cloud'
- name: checkout
if: github.event.label.name == 'ci-run-cloud'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.12'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
- uses: 'google-github-actions/auth@v2'
with:
project_id: 'friendliness-dev-demo'
workload_identity_provider: 'projects/368174856750/locations/global/workloadIdentityPools/github/providers/code-snippets'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install packages
run: python -m pip install -r requirements.txt
- name: Test the notebook
run: python -m jupyter nbconvert --to html --execute 2024/12-bigquery-utils/bigquery-utils.ipynb