Skip to content

Commit

Permalink
Add release-test into github workflow (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
renjiezh authored and ple13 committed Aug 16, 2024
1 parent 3c55a0f commit f9ef673
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 7 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 2024 The Cross-Media Measurement Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Release test

on:
release:
types: [published]
workflow_dispatch:

jobs:
build-test:
name: Build and test
runs-on: ubuntu-20.04
env:
CLUSTER_LOGS_PATH: cluster-logs
steps:
- name: Check out revision
uses: actions/checkout@v3

- uses: ./.github/actions/free-disk-space

- name: Write ~/.bazelrc
run: |
cat << EOF > ~/.bazelrc
build -c opt
build --host_platform //build/platforms:ubuntu_20_04
EOF
- name: Get Bazel cache params
id: get-cache-params
uses: world-federation-of-advertisers/actions/bazel-get-cache-params@v2
with:
cache-version: 1

- name: Restore Bazel cache
uses: actions/cache/restore@v3
with:
path: ${{ steps.get-cache-params.outputs.cache-path }}
key: ${{ steps.get-cache-params.outputs.cache-key }}
restore-keys: |-
${{ steps.get-cache-params.outputs.restore-key }}
- name: Build
run: >
bazelisk build --worker_quit_after_build
//src/test/kotlin/org/wfanet/measurement/integration/deploy/gcloud:GCloudSpannerInProcessReachMeasurementAccuracyTest
- name: Run tests
id: run-tests
run: >
bazelisk test
//src/test/kotlin/org/wfanet/measurement/integration/deploy/gcloud:GCloudSpannerInProcessReachMeasurementAccuracyTest
--test_output=streamed
- name: Upload Bazel testlogs
continue-on-error: true
uses: world-federation-of-advertisers/actions/bazel-upload-testlogs@v2
if: failure() && (steps.run-tests.outcome == 'failure')
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,24 @@ java_test(
runtime_deps = [":gcloud_in_process_life_of_a_report_v2_integration_test"],
)

spanner_emulator_test(
kt_jvm_library(
name = "gcloud_spanner_in_process_reach_measurement_accuracy_test",
srcs = ["GCloudSpannerInProcessReachMeasurementAccuracyTest.kt"],
data = ["@cloud_spanner_emulator//:emulator"],
deps = [
"//src/main/kotlin/org/wfanet/measurement/integration/common:in_process_reach_measurement_accuracy_test",
"//src/main/kotlin/org/wfanet/measurement/integration/deploy/gcloud:spanner_duchy_dependency_provider_rule",
"//src/main/kotlin/org/wfanet/measurement/kingdom/deploy/gcloud/spanner/testing",
],
)

java_test(
name = "GCloudSpannerInProcessReachMeasurementAccuracyTest",
size = "enormous",
srcs = ["GCloudSpannerInProcessReachMeasurementAccuracyTest.kt"],
tags = [
"cpu:2",
"manual",
],
test_class = "org.wfanet.measurement.integration.deploy.gcloud.GCloudSpannerInProcessReachMeasurementAccuracyTest",
deps = [
"//src/main/kotlin/org/wfanet/measurement/integration/common:in_process_reach_measurement_accuracy_test",
"//src/main/kotlin/org/wfanet/measurement/integration/deploy/gcloud:spanner_duchy_dependency_provider_rule",
"//src/main/kotlin/org/wfanet/measurement/kingdom/deploy/gcloud/spanner/testing",
],
runtime_deps = [":gcloud_spanner_in_process_reach_measurement_accuracy_test"],
)

0 comments on commit f9ef673

Please sign in to comment.