From 9452d4baaacdcd0a3358ab7e4c9b1f8af854e455 Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Wed, 6 Dec 2023 15:44:10 -0600 Subject: [PATCH] workflows: update to run unit tests in GitHub Actions job Epic: CRDB-8308 Release note: None --- .../workflows/experimental-github-actions-testing.yml | 11 ++++++++++- build/github/get-engflow-keys.sh | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 build/github/get-engflow-keys.sh diff --git a/.github/workflows/experimental-github-actions-testing.yml b/.github/workflows/experimental-github-actions-testing.yml index edecb8009278..324f1fa3addd 100644 --- a/.github/workflows/experimental-github-actions-testing.yml +++ b/.github/workflows/experimental-github-actions-testing.yml @@ -7,4 +7,13 @@ jobs: test_job: runs-on: [self-hosted, basic_runner_group] steps: - - run: echo hi + - uses: actions/checkout@v4 + with: + # By default, checkout merges the PR into the current master. + # Instead, we want to check out the PR as is. + ref: ${{ github.event.pull_request.head.sha }} + - run: ./build/github/get-engflow-keys.sh + - run: bazel test //pkg:all_tests --config engflowpublic --config crosslinux --jobs 300 --tls_client_certificate=/home/agent/engflow.crt --tls_client_key=/home/agent/engflow.key --remote_download_minimal + - name: clean up + if: always() + run: rm -f /home/agent/engflow.* diff --git a/build/github/get-engflow-keys.sh b/build/github/get-engflow-keys.sh new file mode 100755 index 000000000000..eb535586fe9e --- /dev/null +++ b/build/github/get-engflow-keys.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +gcloud secrets versions access 1 --secret=engflow-mesolite-key > /home/agent/engflow.key +gcloud secrets versions access 1 --secret=engflow-mesolite-crt > /home/agent/engflow.crt