Print only test failures by default, full logs in files #4865
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| permissions: | |
| contents: read | |
| checks: write | |
| statuses: write | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: stable | |
| - name: Check | |
| run: go run . check | |
| working-directory: ./internal/cmd/build | |
| unit-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-intel, macos-arm, windows-latest] | |
| go-version: ["oldstable", "stable"] | |
| include: | |
| - os: macos-intel | |
| runsOn: macos-15-intel | |
| - os: macos-arm | |
| runsOn: macos-14 | |
| permissions: | |
| contents: read | |
| checks: write | |
| statuses: write | |
| runs-on: ${{ matrix.runsOn || matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Unit test | |
| run: go run . unit-test | |
| working-directory: ./internal/cmd/build | |
| env: | |
| TEST_LOG_ARTIFACT_NAME: test-logs-${{ github.job }}-${{ matrix.os }}-${{ matrix.go-version }} | |
| - name: Upload full test logs | |
| id: upload-test-logs | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-logs-${{ github.job }}-${{ matrix.os }}-${{ matrix.go-version }} | |
| path: .build/test-logs | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Link full test logs | |
| if: always() && steps.upload-test-logs.outputs.artifact-url != '' | |
| shell: bash | |
| run: echo "### [Download full test logs]($ARTIFACT_URL)" >> "$GITHUB_STEP_SUMMARY" | |
| env: | |
| ARTIFACT_URL: ${{ steps.upload-test-logs.outputs.artifact-url }} | |
| integ-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-intel, macos-arm, windows-latest] | |
| go-version: ["oldstable", "stable"] | |
| include: | |
| - os: macos-intel | |
| runsOn: macos-15-intel | |
| - os: macos-arm | |
| runsOn: macos-14 | |
| permissions: | |
| contents: read | |
| checks: write | |
| statuses: write | |
| runs-on: ${{ matrix.runsOn || matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Integration tests (without cache) | |
| run: go run . integration-test -dev-server | |
| working-directory: ./internal/cmd/build | |
| env: | |
| TEST_LOG_ARTIFACT_NAME: test-logs-${{ github.job }}-${{ matrix.os }}-${{ matrix.go-version }} | |
| WORKFLOW_CACHE_SIZE: "0" | |
| - name: Upload full test logs | |
| id: upload-test-logs | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-logs-${{ github.job }}-${{ matrix.os }}-${{ matrix.go-version }} | |
| path: .build/test-logs | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Link full test logs | |
| if: always() && steps.upload-test-logs.outputs.artifact-url != '' | |
| shell: bash | |
| run: echo "### [Download full test logs]($ARTIFACT_URL)" >> "$GITHUB_STEP_SUMMARY" | |
| env: | |
| ARTIFACT_URL: ${{ steps.upload-test-logs.outputs.artifact-url }} | |
| integ-test-cache: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-intel, macos-arm, windows-latest] | |
| go-version: ["oldstable", "stable"] | |
| include: | |
| - os: macos-intel | |
| runsOn: macos-15-intel | |
| - os: macos-arm | |
| runsOn: macos-14 | |
| permissions: | |
| contents: read | |
| checks: write | |
| statuses: write | |
| runs-on: ${{ matrix.runsOn || matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Integration tests (with cache) | |
| run: go run . integration-test -dev-server | |
| working-directory: ./internal/cmd/build | |
| env: | |
| TEST_LOG_ARTIFACT_NAME: test-logs-${{ github.job }}-${{ matrix.os }}-${{ matrix.go-version }} | |
| - name: Upload full test logs | |
| id: upload-test-logs | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-logs-${{ github.job }}-${{ matrix.os }}-${{ matrix.go-version }} | |
| path: .build/test-logs | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Link full test logs | |
| if: always() && steps.upload-test-logs.outputs.artifact-url != '' | |
| shell: bash | |
| run: echo "### [Download full test logs]($ARTIFACT_URL)" >> "$GITHUB_STEP_SUMMARY" | |
| env: | |
| ARTIFACT_URL: ${{ steps.upload-test-logs.outputs.artifact-url }} | |
| docker-compose-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| statuses: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Setup Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: stable | |
| - name: Docker compose - checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| repository: temporalio/samples-server | |
| path: ./samples-server | |
| - name: Docker compose - start | |
| run: | | |
| cp ./.github/workflows/docker/docker-compose.override.yaml ./samples-server/compose/docker-compose.override.yaml | |
| cp ./.github/workflows/docker/dynamic-config-custom.yaml ./samples-server/compose/dynamicconfig/dynamic-config-custom.yaml | |
| docker compose --project-directory ./samples-server/compose up & | |
| go run ./.github/workflows/wait_for_server.go | |
| - name: Docker compose - integration tests | |
| run: go run . integration-test | |
| env: | |
| TEST_LOG_ARTIFACT_NAME: test-logs-${{ github.job }} | |
| # TODO(antlai-temporal): Remove this flag once server 1.27 released. | |
| DISABLE_SERVER_1_27_TESTS: "1" | |
| DISABLE_PRIORITY_TESTS: "1" | |
| DISABLE_STANDALONE_ACTIVITY_TESTS: "1" | |
| DISABLE_STANDALONE_NEXUS_TESTS: "1" | |
| DISABLE_ACTIVITY_BACKED_NEXUS_TESTS: "1" | |
| DISABLE_NEXUS_CALLER_TIMEOUT_TESTS: "1" | |
| DISABLE_NEW_NEXUS_ERROR_FORMAT_TESTS: "1" | |
| working-directory: ./internal/cmd/build | |
| - name: Upload full test logs | |
| id: upload-test-logs | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-logs-${{ github.job }} | |
| path: .build/test-logs | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Link full test logs | |
| if: always() && steps.upload-test-logs.outputs.artifact-url != '' | |
| shell: bash | |
| run: echo "### [Download full test logs]($ARTIFACT_URL)" >> "$GITHUB_STEP_SUMMARY" | |
| env: | |
| ARTIFACT_URL: ${{ steps.upload-test-logs.outputs.artifact-url }} | |
| cloud-test: | |
| strategy: | |
| matrix: | |
| go-version: ["oldstable", "stable"] | |
| fips: [true, false] | |
| # Try to avoid running tests in parallel to avoid workflow ID conflict | |
| max-parallel: 1 | |
| # Only supported in non-fork runs, since secrets are not available in forks. | |
| if: ${{ github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-go' }} | |
| runs-on: ubuntu-latest | |
| env: | |
| SERVICE_ADDR: sdk-ci.a2dd6.tmprl.cloud:7233 | |
| TEMPORAL_NAMESPACE: sdk-ci.a2dd6 | |
| TEMPORAL_CLIENT_CERT: ${{ secrets.TEMPORAL_CLIENT_CERT }} | |
| TEMPORAL_CLIENT_KEY: ${{ secrets.TEMPORAL_CLIENT_KEY }} | |
| GODEBUG: ${{ matrix.fips && 'fips140=on' || '' }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Selected integration tests against cloud | |
| # Keep this list intentionally small. Add cloud-safe tests here when | |
| # they cover behavior that cannot be validated against the local dev server. | |
| run: 'go run . integration-test -p 1 -packages . -run "TestIntegrationSuite/(TestBasic|TestShutdownDuringActiveTimerActivityWorkflows)$"' | |
| working-directory: ./internal/cmd/build | |
| env: | |
| TEST_LOG_ARTIFACT_NAME: test-logs-${{ github.job }}-${{ matrix.go-version }}-fips-${{ matrix.fips }} | |
| - name: Upload full test logs | |
| id: upload-test-logs | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-logs-${{ github.job }}-${{ matrix.go-version }}-fips-${{ matrix.fips }} | |
| path: .build/test-logs | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| - name: Link full test logs | |
| if: always() && steps.upload-test-logs.outputs.artifact-url != '' | |
| shell: bash | |
| run: echo "### [Download full test logs]($ARTIFACT_URL)" >> "$GITHUB_STEP_SUMMARY" | |
| env: | |
| ARTIFACT_URL: ${{ steps.upload-test-logs.outputs.artifact-url }} | |
| features-test: | |
| uses: temporalio/features/.github/workflows/go.yaml@main | |
| with: | |
| go-repo-path: ${{github.event.pull_request.head.repo.full_name}} | |
| version: ${{github.event.pull_request.head.ref}} | |
| version-is-repo-ref: true |