fix: Ensure population is persisted in ModelRelease upon creation #14278
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2021 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: Build and test | |
on: | |
push: | |
branches: | |
- main | |
- 'releases/**' | |
pull_request: | |
branches: | |
- main | |
- 'releases/**' | |
types: [opened, synchronize, edited] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-test: | |
name: Build and test | |
runs-on: ubuntu-22.04 | |
env: | |
CLUSTER_LOGS_PATH: cluster-logs | |
steps: | |
- name: Check out revision | |
uses: actions/checkout@v4 | |
- name: Set up Bazel | |
uses: world-federation-of-advertisers/actions/setup-bazel@v2 | |
- uses: ./.github/actions/free-disk-space | |
- name: Write auth.bazelrc | |
env: | |
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |
run: | | |
cat << EOF > auth.bazelrc | |
build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY | |
EOF | |
- name: Write ~/.bazelrc | |
run: | | |
cat << EOF > ~/.bazelrc | |
common --config=ci | |
build --remote_upload_local_results | |
build --define container_registry=localhost:5001 | |
build --define image_repo_prefix=halo | |
build --define image_tag=latest | |
build --define kingdom_public_api_target=kingdom.example.com:8443 | |
build --define worker1_id=worker1 | |
build --define worker1_public_api_target=worker1.example.com:8443 | |
build --define worker2_id=worker2 | |
build --define worker2_public_api_target=worker2.example.com:8443 | |
build --define mc_name=measurementConsumers/foo | |
build --define edp1_name=dataProviders/foo1 | |
build --define edp1_cert_name=dataProviders/foo1/certificates/bar1 | |
build --define edp2_name=dataProviders/foo2 | |
build --define edp2_cert_name=dataProviders/foo2/certificates/bar2 | |
build --define edp3_name=dataProviders/foo3 | |
build --define edp3_cert_name=dataProviders/foo3/certificates/bar3 | |
build --define edp4_name=dataProviders/foo4 | |
build --define edp4_cert_name=dataProviders/foo4/certificates/bar4 | |
build --define edp5_name=dataProviders/foo5 | |
build --define edp5_cert_name=dataProviders/foo5/certificates/bar5 | |
build --define edp6_name=dataProviders/foo6 | |
build --define edp6_cert_name=dataProviders/foo6/certificates/bar6 | |
build --define google_cloud_project=example-project | |
EOF | |
# Reduce chance of disconnection from the Build Event Service. | |
- name: Set TCP keepalive | |
run: sudo sysctl -w net.ipv4.tcp_keepalive_time=60 | |
- name: Check lockfile | |
run: bazel mod deps | |
- name: Build | |
run: > | |
bazel build --worker_quit_after_build | |
//... | |
//src/main/k8s/dev:synthetic_generator_edp_simulators | |
- name: Run tests | |
id: run-tests | |
run: bazel test //... | |
- name: Create cluster | |
id: create-cluster | |
run: | | |
echo "KUBECONFIG=$HOME/.kube/config" >> "$GITHUB_ENV" | |
curl -LOJ https://kind.sigs.k8s.io/examples/kind-with-registry.sh | |
chmod +x kind-with-registry.sh | |
sed -i 's|kind create cluster|kind create cluster --image=kindest/node:v1.30.0|g' kind-with-registry.sh | |
./kind-with-registry.sh | |
- name: Run correctness test | |
id: run-correctness-test | |
run: > | |
bazel test | |
//src/test/kotlin/org/wfanet/measurement/integration/k8s:EmptyClusterCorrectnessTest | |
--test_output=streamed | |
- name: Delete Kubernetes Resources | |
continue-on-error: true | |
run: | | |
kubectl delete all --namespace=default --all --cascade=foreground --wait | |
kubectl delete networkpolicies --namespace=default --all | |
- name: Run panelmatch correctness test | |
id: run-panelmatch-correctness-test | |
run: > | |
bazel test | |
//src/test/kotlin/org/wfanet/panelmatch/integration/k8s:EmptyClusterPanelMatchCorrectnessTest | |
--test_output=streamed | |
- name: Export cluster logs | |
id: export-cluster-logs | |
if: failure() && (steps.run-correctness-test.outcome == 'failure' || steps.run-panelmatch-correctness-test.outcome == 'failure') | |
continue-on-error: true | |
run: | | |
mkdir -p "$CLUSTER_LOGS_PATH" | |
kind export logs "$CLUSTER_LOGS_PATH" | |
- name: Upload cluster logs artifact | |
if: failure() && steps.export-cluster-logs.outcome == 'success' | |
uses: actions/upload-artifact@v4 | |
continue-on-error: true | |
with: | |
name: cluster-logs | |
path: ${{ env.CLUSTER_LOGS_PATH }} | |
- 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' || steps.run-correctness-test.outcome == 'failure' || steps.run-panelmatch-correctness-test.outcome == 'failure') |