Skip to content

Differentiate non-missing GT pairwise bias #4518

Differentiate non-missing GT pairwise bias

Differentiate non-missing GT pairwise bias #4518

Workflow file for this run

name: CI Tests
on:
# Run whenever GitHub’s merge queue asks for required checks
# We add `pull_request` below to get around a merge queue status check limitation:
# https://github.com/orgs/community/discussions/46757#discussioncomment-4912738
pull_request:
merge_group:
permissions:
# Needed for gcloud auth: https://github.com/google-github-actions/auth
id-token: 'write'
contents: 'read'
# Needed for commenting on PRs
pull-requests: 'write'
issues: 'write'
jobs:
ci-unit-test-python:
# Because of limitation discussed https://github.com/orgs/community/discussions/46757#discussioncomment-4912738
# We skip when the workflow is triggered by a pull_request event; otherwise we will run the check twice.
# Once before it gets into the merge queue and once when it is in the merge queue.
# Our tests take a long time to run, so this is not ideal.
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup development environment
uses: ./.github/actions/setup-python-tools
with:
setup_gcloud: "true"
gcp_project_id: ${{ vars.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.workload_identity_provider }}
gcp_service_account_email: ${{ secrets.gcp_service_account_email }}
- name: Run Python Unit Tests
# We use cloud run here instead of using github hosted runners because of limitation of tests
# using GFile library (a.k.a anything that does IO w/ Tensorflow). GFile does not understand
# how to leverage Workload Identity Federation to read assets from GCS, et al. See:
# https://github.com/tensorflow/tensorflow/issues/57104
uses: ./.github/actions/run-cloud-run-command-on-active-checkout
with:
cmd: "make unit_test_py"
service_account: ${{ secrets.gcp_service_account_email }}
project: ${{ vars.GCP_PROJECT_ID }}
ci-unit-test-scala:
# Because of limitation discussed https://github.com/orgs/community/discussions/46757#discussioncomment-4912738
# We skip when the workflow is triggered by a pull_request event; otherwise we will run the check twice.
# Once before it gets into the merge queue and once when it is in the merge queue.
# Our tests take a long time to run, so this is not ideal.
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup development environment
uses: ./.github/actions/setup-python-tools
with:
setup_gcloud: "true"
gcp_project_id: ${{ vars.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.workload_identity_provider }}
gcp_service_account_email: ${{ secrets.gcp_service_account_email }}
- name: Run Scala Unit Tests
# We use cloud run here instead of using github hosted runners because of limitation of tests
# using GFile library (a.k.a anything that does IO w/ Tensorflow). GFile does not understand
# how to leverage Workload Identity Federation to read assets from GCS, et al. See:
# https://github.com/tensorflow/tensorflow/issues/57104
uses: ./.github/actions/run-cloud-run-command-on-active-checkout
with:
cmd: "make unit_test_scala"
service_account: ${{ secrets.gcp_service_account_email }}
project: ${{ vars.GCP_PROJECT_ID }}
ci-unit-test-cpp:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install C++ dependencies
run: bash gigl-core/requirements/install_cpp_deps.sh
- name: Set up Python tools
uses: ./.github/actions/setup-python-tools
- name: Install Python dependencies
run: bash requirements/install_py_deps.sh --skip-glt-post-install
- name: Run C++ Unit Tests
run: make unit_test_cpp
ci-integration-test:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup development environment
uses: ./.github/actions/setup-python-tools
with:
setup_gcloud: "true"
gcp_project_id: ${{ vars.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.workload_identity_provider }}
gcp_service_account_email: ${{ secrets.gcp_service_account_email }}
- name: Run Integration Tests
uses: ./.github/actions/run-cloud-run-command-on-active-checkout
with:
cmd: "make integration_test"
service_account: ${{ secrets.gcp_service_account_email }}
project: ${{ vars.GCP_PROJECT_ID }}
ci-integration-e2e-test:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup development environment
uses: ./.github/actions/setup-python-tools
with:
setup_gcloud: "true"
gcp_project_id: ${{ vars.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.workload_identity_provider }}
gcp_service_account_email: ${{ secrets.gcp_service_account_email }}
- name: Run E2E Tests
uses: ./.github/actions/run-cloud-run-command-on-active-checkout
with:
cmd: "make run_all_e2e_tests"
service_account: ${{ secrets.gcp_service_account_email }}
project: ${{ vars.GCP_PROJECT_ID }}
# TODO(kmonte): Re-enable this once the tests are fixed.
# ci-integration-example-notebooks-test:
# if: github.event_name == 'merge_group'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Setup development environment
# uses: ./.github/actions/setup-python-tools
# with:
# setup_gcloud: "true"
# gcp_project_id: ${{ vars.GCP_PROJECT_ID }}
# workload_identity_provider: ${{ secrets.workload_identity_provider }}
# gcp_service_account_email: ${{ secrets.gcp_service_account_email }}
# - name: Run Example Notebook E2E Tests
# uses: ./.github/actions/run-cloud-run-command-on-active-checkout
# with:
# cmd: "make notebooks_test"
# service_account: ${{ secrets.gcp_service_account_email }}
# project: ${{ vars.GCP_PROJECT_ID }}
ci-lint-test:
if: github.event_name == 'merge_group'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup development environment
uses: ./.github/actions/setup-python-tools
with:
install_dev_deps: "true"
setup_gcloud: "true"
gcp_project_id: ${{ vars.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.workload_identity_provider }}
gcp_service_account_email: ${{ secrets.gcp_service_account_email }}
- name: Run Lint Tests
shell: bash
# Route sbt through Google's Maven Central mirror to avoid 429 rate limits from repo1.maven.org.
# Intentionally set here (CI env) rather than in scala/.sbtopts or scala_spark35/.sbtopts to avoid
# affecting downstream consumers of GiGL (e.g. as a submodule) that have their own Maven routing.
env:
SBT_OPTS: '-Dsbt.override.build.repos=true -Dsbt.repository.config=repositories'
run: |
# sourcing .profile is important to resolve paths for java, sbt, et al.
# It is setup in the setup-python-tools action.
source ~/.profile
make lint_test