CHASM: Remove output from StartExecution fn response #19942
Workflow file for this run
This file contains hidden or 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
| name: All Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - cloud/* | |
| - feature/* | |
| - release/* | |
| permissions: | |
| contents: read | |
| concurrency: # Auto-cancel existing runs in the PR when a new commit is pushed | |
| group: run-tests-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| # For pull_request: use the head of the PR branch (not the merge branch which is the default!) | |
| # For push: use the pushed commit. | |
| COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} | |
| PR_BASE_COMMIT: ${{ github.event.pull_request.base.sha }} | |
| DOCKER_COMPOSE_FILE: ./develop/github/docker-compose.yml | |
| TEMPORAL_VERSION_CHECK_DISABLED: 1 | |
| MAX_TEST_ATTEMPTS: 3 | |
| jobs: | |
| set-up-functional-test: | |
| name: Set up functional test | |
| runs-on: ubuntu-latest | |
| outputs: | |
| shard_indices: ${{ steps.generate_output.outputs.shard_indices }} | |
| total_shards: ${{ steps.generate_output.outputs.shards }} | |
| github_timeout: ${{ steps.generate_output.outputs.github_timeout }} | |
| test_timeout: ${{ steps.generate_output.outputs.test_timeout }} | |
| runs_on: ${{ steps.generate_output.outputs.runs_on }} | |
| runner_x64: ${{ steps.generate_output.outputs.runner_x64 }} | |
| runner_arm: ${{ steps.generate_output.outputs.runner_arm }} | |
| steps: | |
| - id: generate_output | |
| run: | | |
| shards=3 | |
| timeout=35 # update this to TEST_TIMEOUT if you update the Makefile | |
| # Runner configuration: use 8-core runners for temporalio org, standard runners for forks | |
| if [[ "${{ github.repository_owner }}" == "temporalio" ]]; then | |
| runner_x64="ubuntu-latest-8-cores" | |
| runner_arm="ubuntu-24.04-arm64-8-cores" | |
| else | |
| runner_x64="ubuntu-latest" | |
| runner_arm="ubuntu-24.04-arm" | |
| fi | |
| runs_on="[\"${runner_x64}\"]" | |
| { | |
| echo "shard_indices=[ $(seq -s, 0 $((shards-1))) ]" | |
| echo "shards=$shards" | |
| echo "github_timeout=$((timeout+5))" | |
| echo "test_timeout=${timeout}m" | |
| echo "runs_on=$runs_on" | |
| echo "runner_x64=$runner_x64" | |
| echo "runner_arm=$runner_arm" | |
| } >> "$GITHUB_OUTPUT" | |
| pre-build: | |
| name: Pre-build for cache (${{ matrix.arch }}) | |
| needs: set-up-functional-test | |
| strategy: | |
| matrix: | |
| arch: [x64, arm] | |
| runs-on: ${{ matrix.arch == 'arm' && needs.set-up-functional-test.outputs.runner_arm || needs.set-up-functional-test.outputs.runner_x64 }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| id: restore-deps | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - run: make pre-build-functional-test-coverage | |
| - name: Save dependencies | |
| uses: actions/cache/save@v4 | |
| if: ${{ steps.restore-deps.outputs.cache-hit != 'true' }} | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ steps.restore-deps.outputs.cache-primary-key }} | |
| - name: Save build outputs | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| misc-checks: | |
| name: Misc checks | |
| needs: [pre-build, set-up-functional-test] | |
| runs-on: ${{ needs.set-up-functional-test.outputs.runner_x64 }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| # buf-breaking tries to compare HEAD against merge base so we need to be able to find it | |
| fetch-depth: 100 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - name: Restore build outputs | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| - uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: GOOS=windows GOARCH=amd64 make clean-bins bins | |
| - run: GOOS=darwin GOARCH=arm64 make clean-bins bins | |
| - run: make clean-bins ci-build-misc | |
| unit-test: | |
| name: Unit test | |
| needs: [pre-build, set-up-functional-test] | |
| runs-on: ${{ needs.set-up-functional-test.outputs.runner_x64 }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - name: Restore build outputs | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| - name: Run unit tests | |
| timeout-minutes: 20 | |
| run: TEST_TIMEOUT=15m make unit-test-coverage | |
| - name: Generate crash report | |
| if: failure() | |
| run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed | |
| [ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] && | |
| CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash | |
| - name: Generate test summary | |
| uses: mikepenz/action-junit-report@v5.0.0-rc01 | |
| if: failure() | |
| with: | |
| report_paths: ./.testoutput/junit.*.xml | |
| detailed_summary: true | |
| check_annotations: false | |
| annotate_only: true | |
| skip_annotations: true | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: unit-test | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: unit-test | |
| report_type: test_results | |
| - name: Upload test results to GitHub | |
| # Can't pin to major because the action linter doesn't recognize the include-hidden-files flag. | |
| uses: actions/upload-artifact@v4.4.3 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--unit-test | |
| path: ./.testoutput/junit.*.xml | |
| include-hidden-files: true | |
| retention-days: 28 | |
| integration-test: | |
| name: Integration test | |
| needs: [pre-build, set-up-functional-test] | |
| runs-on: ${{ needs.set-up-functional-test.outputs.runner_x64 }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| - name: Start containerized dependencies | |
| uses: hoverkraft-tech/compose-action@v2.0.1 | |
| with: | |
| compose-file: ${{ env.DOCKER_COMPOSE_FILE }} | |
| services: | | |
| cassandra | |
| mysql | |
| postgresql | |
| down-flags: -v | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - name: Restore build outputs | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| - name: Run integration test | |
| timeout-minutes: 15 | |
| run: make integration-test-coverage | |
| - name: Generate crash report | |
| if: failure() | |
| run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed | |
| [ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] && | |
| CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash | |
| - name: Generate test summary | |
| uses: mikepenz/action-junit-report@v5.0.0-rc01 | |
| if: failure() | |
| with: | |
| report_paths: ./.testoutput/junit.*.xml | |
| detailed_summary: true | |
| check_annotations: false | |
| annotate_only: true | |
| skip_annotations: true | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: integration-test | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: integration-test | |
| report_type: test_results | |
| - name: Upload test results to GitHub | |
| # Can't pin to major because the action linter doesn't recognize the include-hidden-files flag. | |
| uses: actions/upload-artifact@v4.4.3 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--integration-test | |
| path: ./.testoutput/junit.*.xml | |
| include-hidden-files: true | |
| retention-days: 28 | |
| - name: Tear down docker compose | |
| if: ${{ always() }} | |
| run: | | |
| docker compose -f ${{ env.DOCKER_COMPOSE_FILE }} down -v | |
| # Root job name includes matrix details so it is unique per shard. | |
| # This MUST stay in sync with the `job_name` passed to the job-id action below. | |
| functional-test: | |
| # Display name shown in the UI. The job-id lookup uses this exact value. | |
| name: Functional test (${{ matrix.name }}, shard ${{ matrix.shard_index }}) | |
| needs: [pre-build, set-up-functional-test] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| name: | |
| - cass_es | |
| - cass_es8 | |
| - cass_os2 | |
| - cass_os3 | |
| - sqlite | |
| - mysql8 | |
| - postgres12 | |
| - postgres12_pgx | |
| shard_index: ${{ fromJson(needs.set-up-functional-test.outputs.shard_indices) }} | |
| runs-on: ${{ fromJson(needs.set-up-functional-test.outputs.runs_on) }} | |
| include: | |
| - name: cass_es | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, elasticsearch] | |
| es_version: v7 | |
| - name: cass_es8 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, elasticsearch8] | |
| es_version: v8 | |
| - name: cass_os2 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, opensearch2] | |
| - name: cass_os3 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, opensearch3] | |
| - name: sqlite | |
| persistence_type: sql | |
| persistence_driver: sqlite | |
| containers: [] | |
| arch: arm | |
| - name: mysql8 | |
| persistence_type: sql | |
| persistence_driver: mysql8 | |
| containers: [mysql] | |
| - name: postgres12 | |
| persistence_type: sql | |
| persistence_driver: postgres12 | |
| containers: [postgresql] | |
| - name: postgres12_pgx | |
| persistence_type: sql | |
| persistence_driver: postgres12_pgx | |
| containers: [postgresql] | |
| runs-on: ${{ matrix.arch == 'arm' && needs.set-up-functional-test.outputs.runner_arm || needs.set-up-functional-test.outputs.runner_x64 }} | |
| env: | |
| TEST_TOTAL_SHARDS: ${{ needs.set-up-functional-test.outputs.total_shards }} | |
| TEST_SHARD_INDEX: ${{ matrix.shard_index }} | |
| PERSISTENCE_TYPE: ${{ matrix.persistence_type }} | |
| PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }} | |
| TEST_TIMEOUT: ${{ needs.set-up-functional-test.outputs.test_timeout }} | |
| steps: | |
| - uses: ScribeMD/docker-cache@0.3.7 | |
| with: | |
| key: docker-${{ runner.os }}${{ runner.arch }}-${{ hashFiles(env.DOCKER_COMPOSE_FILE) }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| - name: Start containerized dependencies | |
| if: ${{ toJson(matrix.containers) != '[]' }} | |
| uses: hoverkraft-tech/compose-action@v2.0.1 | |
| with: | |
| compose-file: ${{ env.DOCKER_COMPOSE_FILE }} | |
| services: "${{ join(matrix.containers, '\n') }}" | |
| down-flags: -v | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - name: Restore build outputs | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| - name: Get job ID | |
| id: get_job_id | |
| uses: ./.github/actions/get-job-id | |
| with: | |
| job_name: Functional test (${{ matrix.name }}, shard ${{ matrix.shard_index }}) | |
| run_id: ${{ github.run_id }} | |
| - name: Run functional test | |
| timeout-minutes: ${{ fromJSON(needs.set-up-functional-test.outputs.github_timeout) }} # make sure this is larger than the test timeout in the Makefile | |
| run: ./develop/github/monitor_test.sh make functional-test-coverage | |
| - name: Print memory snapshot | |
| if: always() | |
| run: if [ -f /tmp/memory_snapshot.txt ]; then cat /tmp/memory_snapshot.txt; fi | |
| - name: Generate crash report | |
| if: failure() | |
| run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed | |
| [ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] && | |
| CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash | |
| - name: Generate test summary | |
| uses: mikepenz/action-junit-report@v5.0.0-rc01 | |
| if: failure() | |
| with: | |
| report_paths: ./.testoutput/junit.*.xml | |
| detailed_summary: true | |
| check_annotations: false | |
| annotate_only: true | |
| skip_annotations: true | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: functional-test | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: functional-test | |
| report_type: test_results | |
| - name: Upload test results to GitHub | |
| # Can't pin to major because the action linter doesn't recognize the include-hidden-files flag. | |
| uses: actions/upload-artifact@v4.4.3 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: junit-xml--${{github.run_id}}--${{ steps.get_job_id.outputs.job_id }}--${{github.run_attempt}}--${{matrix.name}}--${{matrix.shard_index}}--functional-test | |
| path: ./.testoutput/junit.*.xml | |
| include-hidden-files: true | |
| retention-days: 28 | |
| # XDC matrix job. Include `${{ matrix.name }}` in the display name so each | |
| # matrix variant has a unique name for the job-id lookup. | |
| functional-test-xdc: | |
| # Display name shown in the UI. The job-id lookup uses this exact value. | |
| name: Functional test xdc (${{ matrix.name }}) | |
| needs: [pre-build, set-up-functional-test] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| name: | |
| - cass_es | |
| - cass_es8 | |
| - cass_os2 | |
| - cass_os3 | |
| - mysql8 | |
| - postgres12 | |
| - postgres12_pgx | |
| include: | |
| - name: cass_es | |
| persistence_type: nosql | |
| persistence_driver: elasticsearch | |
| parallel_flags: "" | |
| containers: [cassandra, elasticsearch] | |
| - name: cass_es8 | |
| persistence_type: nosql | |
| persistence_driver: elasticsearch | |
| parallel_flags: "" | |
| containers: [cassandra, elasticsearch8] | |
| - name: cass_os2 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, opensearch2] | |
| - name: cass_os3 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, opensearch3] | |
| - name: mysql8 | |
| persistence_type: sql | |
| persistence_driver: mysql8 | |
| parallel_flags: "" | |
| containers: [mysql] | |
| - name: postgres12 | |
| persistence_type: sql | |
| persistence_driver: postgres12 | |
| parallel_flags: "-parallel=2" # reduce parallelism for postgres | |
| containers: [postgresql] | |
| - name: postgres12_pgx | |
| persistence_type: sql | |
| persistence_driver: postgres12_pgx | |
| parallel_flags: "-parallel=2" # reduce parallelism for postgres | |
| containers: [postgresql] | |
| runs-on: ${{ needs.set-up-functional-test.outputs.runner_x64 }} | |
| env: | |
| PERSISTENCE_TYPE: ${{ matrix.persistence_type }} | |
| PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }} | |
| TEST_PARALLEL_FLAGS: ${{ matrix.parallel_flags }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| # Resolve the numeric job ID for this job instance. | |
| # IMPORTANT: `job_name` must exactly match the job's display name above. | |
| - name: Get job ID | |
| id: get_job_id | |
| uses: ./.github/actions/get-job-id | |
| with: | |
| job_name: Functional test xdc (${{ matrix.name }}) | |
| run_id: ${{ github.run_id }} | |
| - name: Start containerized dependencies | |
| uses: hoverkraft-tech/compose-action@v2.0.1 | |
| with: | |
| compose-file: ${{ env.DOCKER_COMPOSE_FILE }} | |
| services: "${{ join(matrix.containers, '\n') }}" | |
| down-flags: -v | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - name: Restore build outputs | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| - name: Run functional test xdc | |
| timeout-minutes: 35 # update this to TEST_TIMEOUT+5 if you update the Makefile | |
| run: ./develop/github/monitor_test.sh make functional-test-xdc-coverage | |
| - name: Print memory snapshot | |
| if: always() | |
| run: if [ -f /tmp/memory_snapshot.txt ]; then cat /tmp/memory_snapshot.txt; fi | |
| - name: Generate crash report | |
| if: failure() | |
| run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed | |
| [ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] && | |
| CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash | |
| - name: Generate test summary | |
| uses: mikepenz/action-junit-report@v5.0.0-rc01 | |
| if: failure() | |
| with: | |
| report_paths: ./.testoutput/junit.*.xml | |
| detailed_summary: true | |
| check_annotations: false | |
| annotate_only: true | |
| skip_annotations: true | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: functional-test-xdc | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: functional-test-xdc | |
| report_type: test_results | |
| - name: Upload test results to GitHub | |
| # Can't pin to major because the action linter doesn't recognize the include-hidden-files flag. | |
| uses: actions/upload-artifact@v4.4.3 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: junit-xml--${{github.run_id}}--${{ steps.get_job_id.outputs.job_id }}--${{github.run_attempt}}--${{matrix.name}}--functional-test-xdc | |
| path: ./.testoutput | |
| include-hidden-files: true | |
| retention-days: 28 | |
| # NDC matrix job. Include `${{ matrix.name }}` in the display name so each | |
| # matrix variant has a unique name for the job-id lookup. | |
| functional-test-ndc: | |
| # Display name shown in the UI. The job-id lookup uses this exact value. | |
| name: Functional test ndc (${{ matrix.name }}) | |
| needs: [pre-build, set-up-functional-test] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| name: | |
| - cass_es | |
| - cass_es8 | |
| - cass_os2 | |
| - cass_os3 | |
| - mysql8 | |
| - postgres12 | |
| - postgres12_pgx | |
| include: | |
| - name: cass_es | |
| persistence_type: nosql | |
| persistence_driver: elasticsearch | |
| containers: [cassandra, elasticsearch] | |
| es_version: v7 | |
| - name: cass_es8 | |
| persistence_type: nosql | |
| persistence_driver: elasticsearch | |
| containers: [cassandra, elasticsearch8] | |
| es_version: v8 | |
| - name: cass_os2 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, opensearch2] | |
| - name: cass_os3 | |
| persistence_type: nosql | |
| persistence_driver: cassandra | |
| containers: [cassandra, opensearch3] | |
| - name: mysql8 | |
| persistence_type: sql | |
| persistence_driver: mysql8 | |
| containers: [mysql] | |
| - name: postgres12 | |
| persistence_type: sql | |
| persistence_driver: postgres12 | |
| containers: [postgresql] | |
| - name: postgres12_pgx | |
| persistence_type: sql | |
| persistence_driver: postgres12_pgx | |
| containers: [postgresql] | |
| runs-on: ${{ needs.set-up-functional-test.outputs.runner_x64 }} | |
| env: | |
| PERSISTENCE_TYPE: ${{ matrix.persistence_type }} | |
| PERSISTENCE_DRIVER: ${{ matrix.persistence_driver }} | |
| ES_VERSION: ${{ matrix.es_version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ env.COMMIT }} | |
| # Resolve the numeric job ID for this job instance. | |
| # IMPORTANT: `job_name` must exactly match the job's display name above. | |
| - name: Get job ID | |
| id: get_job_id | |
| uses: ./.github/actions/get-job-id | |
| with: | |
| job_name: Functional test ndc (${{ matrix.name }}) | |
| run_id: ${{ github.run_id }} | |
| - name: Start containerized dependencies | |
| uses: hoverkraft-tech/compose-action@v2.0.1 | |
| with: | |
| compose-file: ${{ env.DOCKER_COMPOSE_FILE }} | |
| services: "${{ join(matrix.containers, '\n') }}" | |
| down-flags: -v | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: false # do our own caching | |
| - name: Restore dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: go-${{ runner.os }}${{ runner.arch }}-${{ hashFiles('go.mod') }}-deps-${{ hashFiles('go.sum') }} | |
| - name: Restore build outputs | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.cache/go-build | |
| key: go-${{ runner.os }}${{ runner.arch }}-build-${{ env.COMMIT }} | |
| - name: Run functional test ndc | |
| timeout-minutes: 15 | |
| run: ./develop/github/monitor_test.sh make functional-test-ndc-coverage | |
| - name: Print memory snapshot | |
| if: always() | |
| run: if [ -f /tmp/memory_snapshot.txt ]; then cat /tmp/memory_snapshot.txt; fi | |
| - name: Generate crash report | |
| if: failure() | |
| run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed | |
| [ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] && | |
| CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash | |
| - name: Upload code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: functional-test-ndc | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./.testoutput | |
| flags: functional-test-ndc | |
| report_type: test_results | |
| - name: Upload test results to GitHub | |
| # Can't pin to major because the action linter doesn't recognize the include-hidden-files flag. | |
| uses: actions/upload-artifact@v4.4.3 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: junit-xml--${{github.run_id}}--${{ steps.get_job_id.outputs.job_id }}--${{github.run_attempt}}--${{matrix.name}}--functional-test-ndc | |
| path: ./.testoutput/junit.*.xml | |
| include-hidden-files: true | |
| retention-days: 28 | |
| test-status: | |
| if: always() | |
| name: Test Status | |
| needs: | |
| - misc-checks | |
| - unit-test | |
| - integration-test | |
| - functional-test | |
| - functional-test-xdc | |
| - functional-test-ndc | |
| runs-on: ubuntu-latest | |
| env: | |
| RESULTS: ${{ toJSON(needs.*.result) }} | |
| steps: | |
| - name: Check results | |
| run: | | |
| # all statuses must be success | |
| if [[ -n $(echo "$RESULTS" | jq '.[] | select (. != "success")') ]]; then | |
| exit 1 | |
| fi | |
| notify-failure: | |
| name: Notify Slack on Failure | |
| if: | | |
| always() && | |
| github.ref == 'refs/heads/main' && | |
| needs.test-status.result == 'failure' | |
| needs: test-status | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| actions: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| cache: true | |
| - name: Send Slack notification | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| go run ./cmd/tools/ci-notify \ | |
| --run-id "${{ github.run_id }}" \ | |
| --slack-webhook "$SLACK_WEBHOOK" |