2023-04-19 02:45:30 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
|
|
name: test-integrations
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-07-24 16:05:43 +00:00
|
|
|
branches-ignore:
|
|
|
|
- stable-website
|
2023-04-19 02:45:30 +00:00
|
|
|
- 'docs/**'
|
|
|
|
- 'ui/**'
|
2023-07-24 16:05:43 +00:00
|
|
|
- 'mktg-**' # Digital Team Terraform-generated branch prefix
|
|
|
|
- 'backport/docs/**'
|
|
|
|
- 'backport/ui/**'
|
|
|
|
- 'backport/mktg-**'
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
TEST_RESULTS_DIR: /tmp/test-results
|
|
|
|
TEST_RESULTS_ARTIFACT_NAME: test-results
|
|
|
|
CONSUL_LICENSE: ${{ secrets.CONSUL_LICENSE }}
|
|
|
|
GOTAGS: ${{ endsWith(github.repository, '-enterprise') && 'consulent' || '' }}
|
2023-11-20 16:39:51 +00:00
|
|
|
GOTESTSUM_VERSION: "1.11.0"
|
2023-04-19 02:45:30 +00:00
|
|
|
CONSUL_BINARY_UPLOAD_NAME: consul-bin
|
|
|
|
# strip the hashicorp/ off the front of github.repository for consul
|
2023-07-14 21:13:41 +00:00
|
|
|
CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'hashicorp/consul' }}
|
2023-06-21 15:26:27 +00:00
|
|
|
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
|
2023-09-20 21:33:30 +00:00
|
|
|
SKIP_CHECK_BRANCH: ${{ github.head_ref || github.ref_name }}
|
2023-04-19 02:45:30 +00:00
|
|
|
|
2023-08-28 16:05:25 +00:00
|
|
|
concurrency:
|
2024-05-22 18:43:04 +00:00
|
|
|
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
|
2023-08-28 16:05:25 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-04-19 02:45:30 +00:00
|
|
|
jobs:
|
2023-08-23 19:26:05 +00:00
|
|
|
conditional-skip:
|
2023-10-05 17:02:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-08-23 19:26:05 +00:00
|
|
|
name: Get files changed and conditionally skip CI
|
|
|
|
outputs:
|
2023-09-20 21:33:30 +00:00
|
|
|
skip-ci: ${{ steps.read-files.outputs.skip-ci }}
|
2023-08-23 19:26:05 +00:00
|
|
|
steps:
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-08-23 19:26:05 +00:00
|
|
|
with:
|
2023-10-05 17:02:12 +00:00
|
|
|
fetch-depth: 0
|
2023-08-23 19:26:05 +00:00
|
|
|
- name: Get changed files
|
|
|
|
id: read-files
|
2024-06-18 19:38:35 +00:00
|
|
|
run: ./.github/scripts/check_skip_ci.sh
|
2023-08-23 19:26:05 +00:00
|
|
|
|
2023-04-19 02:45:30 +00:00
|
|
|
setup:
|
2023-08-23 19:26:05 +00:00
|
|
|
needs: [conditional-skip]
|
2023-04-19 02:45:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Setup
|
2023-09-20 21:33:30 +00:00
|
|
|
if: needs.conditional-skip.outputs.skip-ci != 'true'
|
2023-04-19 02:45:30 +00:00
|
|
|
outputs:
|
|
|
|
compute-small: ${{ steps.runners.outputs.compute-small }}
|
|
|
|
compute-medium: ${{ steps.runners.outputs.compute-medium }}
|
|
|
|
compute-large: ${{ steps.runners.outputs.compute-large }}
|
|
|
|
compute-xl: ${{ steps.runners.outputs.compute-xl }}
|
|
|
|
enterprise: ${{ steps.runners.outputs.enterprise }}
|
|
|
|
steps:
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-04-19 02:45:30 +00:00
|
|
|
- id: runners
|
|
|
|
run: .github/scripts/get_runner_classes.sh
|
|
|
|
|
2024-01-08 22:18:41 +00:00
|
|
|
get-go-version:
|
|
|
|
uses: ./.github/workflows/reusable-get-go-version.yml
|
|
|
|
|
2024-07-05 19:19:23 +00:00
|
|
|
get-envoy-versions:
|
|
|
|
uses: ./.github/workflows/reusable-get-envoy-versions.yml
|
|
|
|
|
2023-04-19 02:45:30 +00:00
|
|
|
dev-build:
|
2024-01-08 22:18:41 +00:00
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
- get-go-version
|
2023-04-19 02:45:30 +00:00
|
|
|
uses: ./.github/workflows/reusable-dev-build.yml
|
|
|
|
with:
|
2023-08-31 14:56:59 +00:00
|
|
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
2023-04-19 02:45:30 +00:00
|
|
|
repository-name: ${{ github.repository }}
|
|
|
|
uploaded-binary-name: 'consul-bin'
|
2024-01-08 22:18:41 +00:00
|
|
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
2023-04-19 02:45:30 +00:00
|
|
|
secrets:
|
|
|
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
nomad-integration-test:
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
- dev-build
|
2023-05-10 20:49:18 +00:00
|
|
|
permissions:
|
|
|
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
|
|
|
contents: read
|
2023-04-19 02:45:30 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-05-22 18:43:04 +00:00
|
|
|
nomad-version: ['v1.7.7', 'v1.6.10', 'v1.5.17']
|
2023-04-19 02:45:30 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Nomad
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
|
|
|
repository: hashicorp/nomad
|
|
|
|
ref: ${{ matrix.nomad-version }}
|
|
|
|
|
|
|
|
- name: Install Go
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
2024-01-08 22:18:41 +00:00
|
|
|
# Do not explicitly set Go version here, as it should depend on what Nomad declares.
|
2023-04-19 02:45:30 +00:00
|
|
|
go-version-file: 'go.mod'
|
|
|
|
|
|
|
|
- name: Fetch Consul binary
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
|
|
|
name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}'
|
|
|
|
path: ./bin
|
|
|
|
- name: Restore Consul permissions
|
|
|
|
run: |
|
|
|
|
chmod +x ./bin/consul
|
|
|
|
echo "$(pwd)/bin" >> $GITHUB_PATH
|
|
|
|
|
|
|
|
- name: Make Nomad dev build
|
2024-05-22 18:43:04 +00:00
|
|
|
run: |
|
|
|
|
make pkg/linux_amd64/nomad
|
|
|
|
echo "$(pwd)/pkg/linux_amd64" >> $GITHUB_PATH
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
- name: Run integration tests
|
|
|
|
run: |
|
|
|
|
go install gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} && \
|
|
|
|
gotestsum \
|
2023-11-20 16:39:51 +00:00
|
|
|
--format=github-actions \
|
2023-04-19 02:45:30 +00:00
|
|
|
--rerun-fails \
|
|
|
|
--rerun-fails-report=/tmp/gotestsum-rerun-fails \
|
|
|
|
--packages="./command/agent/consul" \
|
|
|
|
--junitfile $TEST_RESULTS_DIR/results.xml -- \
|
|
|
|
-run TestConsul
|
2023-10-06 16:06:12 +00:00
|
|
|
|
2023-05-10 20:49:18 +00:00
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Authenticate to Vault
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: vault-auth
|
|
|
|
run: vault-auth
|
|
|
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Fetch Secrets
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: secrets
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: hashicorp/vault-action@v3
|
2023-05-10 20:49:18 +00:00
|
|
|
with:
|
|
|
|
url: ${{ steps.vault-auth.outputs.addr }}
|
|
|
|
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
|
|
|
|
token: ${{ steps.vault-auth.outputs.token }}
|
|
|
|
secrets: |
|
|
|
|
kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY;
|
|
|
|
|
|
|
|
- name: prepare datadog-ci
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
run: |
|
|
|
|
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci"
|
|
|
|
chmod +x /usr/local/bin/datadog-ci
|
|
|
|
|
|
|
|
- name: upload coverage
|
2023-05-24 18:57:49 +00:00
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-05-10 20:49:18 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
vault-integration-test:
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
|
|
|
needs:
|
|
|
|
- setup
|
2024-01-16 19:24:06 +00:00
|
|
|
- get-go-version
|
2023-04-19 02:45:30 +00:00
|
|
|
- dev-build
|
2023-05-10 20:49:18 +00:00
|
|
|
permissions:
|
|
|
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
|
|
|
contents: read
|
2023-04-19 02:45:30 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-05-22 18:43:04 +00:00
|
|
|
vault-version: ["1.16.2", "1.15.6", "1.14.10"]
|
2023-04-19 02:45:30 +00:00
|
|
|
env:
|
|
|
|
VAULT_BINARY_VERSION: ${{ matrix.vault-version }}
|
|
|
|
steps:
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
|
|
|
|
- name: Setup Git
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') }}
|
|
|
|
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
|
|
|
|
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
2024-01-16 19:24:06 +00:00
|
|
|
# We use the current Consul Go version here since Vault is installed as a binary
|
|
|
|
# and tests are run from the Consul repo.
|
|
|
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
- name: Install Vault
|
|
|
|
run: |
|
|
|
|
wget -q -O /tmp/vault.zip "https://releases.hashicorp.com/vault/${{ env.VAULT_BINARY_VERSION }}/vault_${{ env.VAULT_BINARY_VERSION }}_linux_amd64.zip"
|
|
|
|
unzip -d /tmp /tmp/vault.zip
|
|
|
|
echo "/tmp" >> $GITHUB_PATH
|
|
|
|
|
|
|
|
- name: Run Connect CA Provider Tests
|
|
|
|
run: |
|
|
|
|
mkdir -p "${{ env.TEST_RESULTS_DIR }}"
|
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
2023-11-20 16:39:51 +00:00
|
|
|
--format=github-actions \
|
2023-04-19 02:45:30 +00:00
|
|
|
--junitfile "${{ env.TEST_RESULTS_DIR }}/gotestsum-report.xml" \
|
|
|
|
-- -tags "${{ env.GOTAGS }}" -cover -coverprofile=coverage.txt ./agent/connect/ca
|
|
|
|
# Run leader tests that require Vault
|
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
2023-11-20 16:39:51 +00:00
|
|
|
--format=github-actions \
|
2023-04-19 02:45:30 +00:00
|
|
|
--junitfile "${{ env.TEST_RESULTS_DIR }}/gotestsum-report-leader.xml" \
|
|
|
|
-- -tags "${{ env.GOTAGS }}" -cover -coverprofile=coverage-leader.txt -run Vault ./agent/consul
|
|
|
|
# Run agent tests that require Vault
|
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
2023-11-20 16:39:51 +00:00
|
|
|
--format=github-actions \
|
2023-04-19 02:45:30 +00:00
|
|
|
--junitfile "${{ env.TEST_RESULTS_DIR }}/gotestsum-report-agent.xml" \
|
|
|
|
-- -tags "${{ env.GOTAGS }}" -cover -coverprofile=coverage-agent.txt -run Vault ./agent
|
|
|
|
|
2023-05-10 20:49:18 +00:00
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Authenticate to Vault
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: vault-auth
|
|
|
|
run: vault-auth
|
|
|
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Fetch Secrets
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: secrets
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: hashicorp/vault-action@v3
|
2023-05-10 20:49:18 +00:00
|
|
|
with:
|
|
|
|
url: ${{ steps.vault-auth.outputs.addr }}
|
|
|
|
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
|
|
|
|
token: ${{ steps.vault-auth.outputs.token }}
|
|
|
|
secrets: |
|
|
|
|
kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY;
|
|
|
|
|
|
|
|
- name: prepare datadog-ci
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
run: |
|
|
|
|
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci"
|
|
|
|
chmod +x /usr/local/bin/datadog-ci
|
|
|
|
|
|
|
|
- name: upload coverage
|
2023-05-24 18:57:49 +00:00
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-05-10 20:49:18 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" "${{ env.TEST_RESULTS_DIR }}/gotestsum-report.xml"
|
|
|
|
|
|
|
|
- name: upload leader coverage
|
2023-05-24 18:57:49 +00:00
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-05-10 20:49:18 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" "${{ env.TEST_RESULTS_DIR }}/gotestsum-report-leader.xml"
|
|
|
|
|
|
|
|
- name: upload agent coverage
|
2023-05-24 18:57:49 +00:00
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-05-10 20:49:18 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" "${{ env.TEST_RESULTS_DIR }}/gotestsum-report-agent.xml"
|
|
|
|
|
2023-04-19 02:45:30 +00:00
|
|
|
generate-envoy-job-matrices:
|
|
|
|
needs: [setup]
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
|
|
|
name: Generate Envoy Job Matrices
|
|
|
|
outputs:
|
|
|
|
envoy-matrix: ${{ steps.set-matrix.outputs.envoy-matrix }}
|
|
|
|
steps:
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-04-19 02:45:30 +00:00
|
|
|
- name: Generate Envoy Job Matrix
|
|
|
|
id: set-matrix
|
|
|
|
env:
|
2024-07-05 19:19:23 +00:00
|
|
|
# TEST_SPLITS sets the number of test case splits to use in the matrix. This will be
|
|
|
|
# further multiplied in envoy-integration tests by the other dimensions in the matrix
|
|
|
|
# to determine the total number of runners used.
|
|
|
|
TEST_SPLITS: 4
|
2023-04-19 02:45:30 +00:00
|
|
|
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
|
|
|
|
run: |
|
2023-04-24 20:25:57 +00:00
|
|
|
NUM_DIRS=$(find ./test/integration/connect/envoy -mindepth 1 -maxdepth 1 -type d | wc -l)
|
|
|
|
|
2024-07-05 19:19:23 +00:00
|
|
|
if [ "$NUM_DIRS" -lt "$TEST_SPLITS" ]; then
|
|
|
|
echo "TEST_SPLITS is larger than the number of tests/packages to split."
|
|
|
|
TEST_SPLITS=$((NUM_DIRS-1))
|
2023-04-21 16:01:05 +00:00
|
|
|
fi
|
2024-07-05 19:19:23 +00:00
|
|
|
# fix issue where test splitting calculation generates 1 more split than TEST_SPLITS.
|
|
|
|
TEST_SPLITS=$((TEST_SPLITS-1))
|
2023-04-19 02:45:30 +00:00
|
|
|
{
|
|
|
|
echo -n "envoy-matrix="
|
|
|
|
find ./test/integration/connect/envoy -maxdepth 1 -type d -print0 \
|
|
|
|
| xargs -0 -n 1 basename \
|
2024-07-05 19:19:23 +00:00
|
|
|
| jq --raw-input --argjson runnercount "$TEST_SPLITS" "$JQ_SLICER" \
|
2023-04-19 02:45:30 +00:00
|
|
|
| jq --compact-output 'map(join("|"))'
|
|
|
|
} >> "$GITHUB_OUTPUT"
|
2023-10-06 16:06:12 +00:00
|
|
|
|
2023-04-19 02:45:30 +00:00
|
|
|
envoy-integration-test:
|
2023-08-31 14:56:59 +00:00
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
2023-04-19 02:45:30 +00:00
|
|
|
needs:
|
|
|
|
- setup
|
2024-01-08 22:18:41 +00:00
|
|
|
- get-go-version
|
2024-07-05 19:19:23 +00:00
|
|
|
- get-envoy-versions
|
2023-04-19 02:45:30 +00:00
|
|
|
- generate-envoy-job-matrices
|
|
|
|
- dev-build
|
2023-05-10 20:49:18 +00:00
|
|
|
permissions:
|
|
|
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
|
|
|
contents: read
|
2023-04-19 02:45:30 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
xds-target: ["server", "client"]
|
|
|
|
test-cases: ${{ fromJSON(needs.generate-envoy-job-matrices.outputs.envoy-matrix) }}
|
|
|
|
env:
|
2024-07-05 19:19:23 +00:00
|
|
|
ENVOY_VERSION: ${{ needs.get-envoy-versions.outputs.max-envoy-version }}
|
2023-04-19 02:45:30 +00:00
|
|
|
XDS_TARGET: ${{ matrix.xds-target }}
|
|
|
|
AWS_LAMBDA_REGION: us-west-2
|
|
|
|
steps:
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
|
|
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
2024-01-08 22:18:41 +00:00
|
|
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
- name: fetch binary
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
|
|
|
name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}'
|
|
|
|
path: ./bin
|
|
|
|
- name: restore mode+x
|
|
|
|
run: chmod +x ./bin/consul
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
- name: Docker build
|
|
|
|
run: docker build -t consul:local -f ./build-support/docker/Consul-Dev.dockerfile ./bin
|
|
|
|
|
|
|
|
- name: Envoy Integration Tests
|
|
|
|
env:
|
|
|
|
GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml
|
|
|
|
GOTESTSUM_FORMAT: standard-verbose
|
|
|
|
COMPOSE_INTERACTIVE_NO_CLI: 1
|
|
|
|
LAMBDA_TESTS_ENABLED: "true"
|
|
|
|
# tput complains if this isn't set to something.
|
|
|
|
TERM: ansi
|
|
|
|
run: |
|
|
|
|
# shellcheck disable=SC2001
|
|
|
|
echo "Running $(sed 's,|, ,g' <<< "${{ matrix.test-cases }}" |wc -w) subtests"
|
|
|
|
# shellcheck disable=SC2001
|
|
|
|
sed 's,|,\n,g' <<< "${{ matrix.test-cases }}"
|
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
|
|
|
--debug \
|
|
|
|
--rerun-fails \
|
|
|
|
--rerun-fails-report=/tmp/gotestsum-rerun-fails \
|
|
|
|
--jsonfile /tmp/jsonfile/go-test.log \
|
|
|
|
--packages=./test/integration/connect/envoy \
|
|
|
|
-- -timeout=30m -tags integration -run="TestEnvoy/(${{ matrix.test-cases }})"
|
|
|
|
|
2023-05-10 20:49:18 +00:00
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Authenticate to Vault
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: vault-auth
|
|
|
|
run: vault-auth
|
|
|
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Fetch Secrets
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: secrets
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: hashicorp/vault-action@v3
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
2023-05-10 20:49:18 +00:00
|
|
|
url: ${{ steps.vault-auth.outputs.addr }}
|
|
|
|
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
|
|
|
|
token: ${{ steps.vault-auth.outputs.token }}
|
|
|
|
secrets: |
|
|
|
|
kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY;
|
|
|
|
|
|
|
|
- name: prepare datadog-ci
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
run: |
|
|
|
|
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci"
|
|
|
|
chmod +x /usr/local/bin/datadog-ci
|
|
|
|
|
|
|
|
- name: upload coverage
|
2023-05-24 18:57:49 +00:00
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-05-10 20:49:18 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
2023-04-19 02:45:30 +00:00
|
|
|
|
|
|
|
compatibility-integration-test:
|
2023-10-05 17:02:12 +00:00
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }} # NOTE: do not change without tuning the -p and -parallel flags in go test.
|
2023-04-19 02:45:30 +00:00
|
|
|
needs:
|
|
|
|
- setup
|
2024-01-08 22:18:41 +00:00
|
|
|
- get-go-version
|
2024-07-05 19:19:23 +00:00
|
|
|
- get-envoy-versions
|
2023-04-19 02:45:30 +00:00
|
|
|
- dev-build
|
2023-05-10 20:49:18 +00:00
|
|
|
permissions:
|
|
|
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
|
|
|
contents: read
|
2023-05-11 22:49:49 +00:00
|
|
|
env:
|
2024-07-05 19:19:23 +00:00
|
|
|
ENVOY_VERSION: ${{ needs.get-envoy-versions.outputs.max-envoy-version }}
|
|
|
|
CONSUL_DATAPLANE_IMAGE: "docker.io/hashicorppreview/consul-dataplane:1.5-dev-ubi"
|
2023-04-19 02:45:30 +00:00
|
|
|
steps:
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-06-22 14:56:45 +00:00
|
|
|
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
|
|
|
|
- name: Setup Git
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') }}
|
|
|
|
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
2024-01-08 22:18:41 +00:00
|
|
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
2023-04-19 02:45:30 +00:00
|
|
|
- run: go env
|
2023-05-17 18:57:12 +00:00
|
|
|
- name: docker env
|
|
|
|
run: |
|
|
|
|
docker version
|
|
|
|
docker info
|
2023-04-19 02:45:30 +00:00
|
|
|
- name: fetch binary
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
|
|
|
name: '${{ env.CONSUL_BINARY_UPLOAD_NAME }}'
|
|
|
|
path: .
|
|
|
|
- name: restore mode+x
|
|
|
|
run: chmod +x consul
|
2023-05-17 18:57:12 +00:00
|
|
|
# Build the consul:local image from the already built binary
|
2023-04-19 02:45:30 +00:00
|
|
|
- name: Build consul:local image
|
|
|
|
run: docker build -t ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local -f ./build-support/docker/Consul-Dev.dockerfile .
|
2023-05-11 22:49:49 +00:00
|
|
|
- name: Build consul-envoy:target-version image
|
2023-05-15 18:53:07 +00:00
|
|
|
id: buildConsulEnvoyImage
|
|
|
|
continue-on-error: true
|
|
|
|
run: docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=${{ env.CONSUL_LATEST_IMAGE_NAME }}:local --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets
|
|
|
|
- name: Retry Build consul-envoy:target-version image
|
|
|
|
if: steps.buildConsulEnvoyImage.outcome == 'failure'
|
2023-05-11 22:49:49 +00:00
|
|
|
run: docker build -t consul-envoy:target-version --build-arg CONSUL_IMAGE=${{ env.CONSUL_LATEST_IMAGE_NAME }}:local --build-arg ENVOY_VERSION=${{ env.ENVOY_VERSION }} -f ./test/integration/consul-container/assets/Dockerfile-consul-envoy ./test/integration/consul-container/assets
|
2023-09-26 20:21:47 +00:00
|
|
|
- name: Build consul-dataplane:local image
|
2023-10-06 16:06:12 +00:00
|
|
|
run: docker build -t consul-dataplane:local --build-arg CONSUL_IMAGE=${{ env.CONSUL_LATEST_IMAGE_NAME }}:local --build-arg CONSUL_DATAPLANE_IMAGE=${{ env.CONSUL_DATAPLANE_IMAGE }} -f ./test/integration/consul-container/assets/Dockerfile-consul-dataplane ./test/integration/consul-container/assets
|
2023-04-19 02:45:30 +00:00
|
|
|
- name: Configure GH workaround for ipv6 loopback
|
|
|
|
if: ${{ !endsWith(github.repository, '-enterprise') }}
|
|
|
|
run: |
|
|
|
|
cat /etc/hosts && echo "-----------"
|
|
|
|
sudo sed -i 's/::1 *localhost ip6-localhost ip6-loopback/::1 ip6-localhost ip6-loopback/g' /etc/hosts
|
|
|
|
cat /etc/hosts
|
|
|
|
- name: Compatibility Integration Tests
|
|
|
|
run: |
|
|
|
|
mkdir -p "/tmp/test-results"
|
|
|
|
cd ./test/integration/consul-container
|
|
|
|
docker run --rm ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local consul version
|
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
|
|
|
--raw-command \
|
2023-11-20 16:39:51 +00:00
|
|
|
--format=github-actions \
|
|
|
|
--rerun-fails \
|
2023-04-19 02:45:30 +00:00
|
|
|
-- \
|
|
|
|
go test \
|
2023-10-05 17:02:12 +00:00
|
|
|
-p=6 \
|
|
|
|
-parallel=4 \
|
2023-04-19 02:45:30 +00:00
|
|
|
-tags "${{ env.GOTAGS }}" \
|
|
|
|
-timeout=30m \
|
|
|
|
-json \
|
2023-07-18 23:41:30 +00:00
|
|
|
`go list -tags "${{ env.GOTAGS }}" ./... | grep -v upgrade | grep -v peering_commontopo` \
|
2023-04-19 02:45:30 +00:00
|
|
|
--target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \
|
|
|
|
--target-version local \
|
2023-05-08 17:15:38 +00:00
|
|
|
--latest-image docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }} \
|
2023-04-19 02:45:30 +00:00
|
|
|
--latest-version latest
|
|
|
|
ls -lrt
|
|
|
|
env:
|
2023-04-19 16:19:29 +00:00
|
|
|
# this is needed because of incompatibility between RYUK container and GHA
|
2023-04-19 02:45:30 +00:00
|
|
|
GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml
|
|
|
|
GOTESTSUM_FORMAT: standard-verbose
|
|
|
|
COMPOSE_INTERACTIVE_NO_CLI: 1
|
|
|
|
# tput complains if this isn't set to something.
|
|
|
|
TERM: ansi
|
|
|
|
|
2023-05-10 20:49:18 +00:00
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Authenticate to Vault
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: vault-auth
|
|
|
|
run: vault-auth
|
|
|
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Fetch Secrets
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
id: secrets
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: hashicorp/vault-action@v3
|
2023-04-19 02:45:30 +00:00
|
|
|
with:
|
2023-05-10 20:49:18 +00:00
|
|
|
url: ${{ steps.vault-auth.outputs.addr }}
|
|
|
|
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
|
|
|
|
token: ${{ steps.vault-auth.outputs.token }}
|
|
|
|
secrets: |
|
|
|
|
kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY;
|
|
|
|
|
|
|
|
- name: prepare datadog-ci
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }}
|
2023-05-10 20:49:18 +00:00
|
|
|
run: |
|
|
|
|
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci"
|
|
|
|
chmod +x /usr/local/bin/datadog-ci
|
|
|
|
|
|
|
|
- name: upload coverage
|
2023-05-24 18:57:49 +00:00
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-05-10 20:49:18 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
2023-04-19 02:45:30 +00:00
|
|
|
|
2023-10-30 22:20:23 +00:00
|
|
|
integration-test-with-deployer:
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
|
|
|
|
needs:
|
|
|
|
- setup
|
2024-01-08 22:18:41 +00:00
|
|
|
- get-go-version
|
2023-10-30 22:20:23 +00:00
|
|
|
permissions:
|
|
|
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
|
|
|
contents: read
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2023-11-02 19:25:48 +00:00
|
|
|
env:
|
|
|
|
DEPLOYER_CONSUL_DATAPLANE_IMAGE: "docker.mirror.hashicorp.services/hashicorppreview/consul-dataplane:1.3-dev"
|
2023-10-30 22:20:23 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
2023-10-30 22:20:23 +00:00
|
|
|
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
|
|
|
|
- name: Setup Git
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') }}
|
|
|
|
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
|
2024-05-14 19:49:03 +00:00
|
|
|
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
|
2023-10-30 22:20:23 +00:00
|
|
|
with:
|
2024-01-08 22:18:41 +00:00
|
|
|
go-version: ${{ needs.get-go-version.outputs.go-version }}
|
2023-10-30 22:20:23 +00:00
|
|
|
- run: go env
|
|
|
|
- name: Build image
|
2023-11-07 18:41:14 +00:00
|
|
|
run: make test-deployer-setup
|
2023-10-30 22:20:23 +00:00
|
|
|
- name: Integration Tests
|
|
|
|
run: |
|
|
|
|
mkdir -p "${{ env.TEST_RESULTS_DIR }}"
|
2023-11-20 16:39:51 +00:00
|
|
|
#export NOLOGBUFFER=1
|
2023-11-02 19:25:48 +00:00
|
|
|
cd ./test-integ
|
2023-10-30 22:20:23 +00:00
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
|
|
|
--raw-command \
|
2023-11-20 16:39:51 +00:00
|
|
|
--format=github-actions \
|
2023-10-30 22:20:23 +00:00
|
|
|
-- \
|
|
|
|
go test \
|
|
|
|
-tags "${{ env.GOTAGS }}" \
|
|
|
|
-timeout=20m \
|
|
|
|
-parallel=2 \
|
2024-02-07 20:21:44 +00:00
|
|
|
-failfast \
|
2023-11-02 19:25:48 +00:00
|
|
|
-json \
|
2023-11-16 00:32:37 +00:00
|
|
|
`go list -tags "${{ env.GOTAGS }}" ./... | grep -v peering_commontopo | grep -v upgrade ` \
|
2023-10-30 22:20:23 +00:00
|
|
|
--target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \
|
2023-11-02 19:25:48 +00:00
|
|
|
--target-version local \
|
|
|
|
--latest-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \
|
|
|
|
--latest-version latest
|
2023-10-30 22:20:23 +00:00
|
|
|
env:
|
|
|
|
# this is needed because of incompatibility between RYUK container and GHA
|
|
|
|
GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml
|
|
|
|
GOTESTSUM_FORMAT: standard-verbose
|
|
|
|
COMPOSE_INTERACTIVE_NO_CLI: 1
|
|
|
|
# tput complains if this isn't set to something.
|
|
|
|
TERM: ansi
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Authenticate to Vault
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-10-30 22:20:23 +00:00
|
|
|
id: vault-auth
|
|
|
|
run: vault-auth
|
|
|
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
- name: Fetch Secrets
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }}
|
2023-10-30 22:20:23 +00:00
|
|
|
id: secrets
|
2024-05-14 19:49:03 +00:00
|
|
|
uses: hashicorp/vault-action@v3
|
2023-10-30 22:20:23 +00:00
|
|
|
with:
|
|
|
|
url: ${{ steps.vault-auth.outputs.addr }}
|
|
|
|
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
|
|
|
|
token: ${{ steps.vault-auth.outputs.token }}
|
|
|
|
secrets: |
|
|
|
|
kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY;
|
|
|
|
|
|
|
|
- name: prepare datadog-ci
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }}
|
2023-10-30 22:20:23 +00:00
|
|
|
run: |
|
|
|
|
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci"
|
|
|
|
chmod +x /usr/local/bin/datadog-ci
|
|
|
|
|
|
|
|
- name: upload coverage
|
|
|
|
# do not run on forks
|
2023-12-14 23:13:04 +00:00
|
|
|
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }}
|
2023-10-30 22:20:23 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
DD_ENV: ci
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
2023-07-18 23:41:30 +00:00
|
|
|
|
2023-04-19 02:45:30 +00:00
|
|
|
test-integrations-success:
|
2023-10-05 17:02:12 +00:00
|
|
|
needs:
|
2023-08-23 19:26:05 +00:00
|
|
|
- conditional-skip
|
2023-04-19 02:45:30 +00:00
|
|
|
- setup
|
|
|
|
- dev-build
|
|
|
|
- nomad-integration-test
|
|
|
|
- vault-integration-test
|
|
|
|
- generate-envoy-job-matrices
|
|
|
|
- envoy-integration-test
|
|
|
|
- compatibility-integration-test
|
2023-10-30 22:20:23 +00:00
|
|
|
- integration-test-with-deployer
|
2023-04-19 02:45:30 +00:00
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
2023-09-20 21:33:30 +00:00
|
|
|
if: always() && needs.conditional-skip.outputs.skip-ci != 'true'
|
2023-04-19 02:45:30 +00:00
|
|
|
steps:
|
2023-04-25 20:17:48 +00:00
|
|
|
- name: evaluate upstream job results
|
|
|
|
run: |
|
|
|
|
# exit 1 if failure or cancelled result for any upstream job
|
|
|
|
if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure|cancelled)\"'; then
|
|
|
|
printf "Tests failed or workflow cancelled:\n\n${{ toJSON(needs) }}"
|
|
|
|
exit 1
|
|
|
|
fi
|