Fix verbosity #1365
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: Keystore Checks | |
| permissions: | |
| contents: read | |
| on: [push, merge_group] | |
| jobs: | |
| changes: | |
| name: detect changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| keystore-src: ${{ steps.keystore-changes.outputs.src }} | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: keystore-changes | |
| with: | |
| filters: | | |
| src: | |
| - 'keystore/**' | |
| run-tests: | |
| name: run tests | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.keystore-src == 'true' | |
| defaults: | |
| run: | |
| working-directory: keystore | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: ./.github/actions/setup-go | |
| with: | |
| go-version-file: "go.mod" | |
| restore-build-cache-only: "false" | |
| - name: Build | |
| run: go build -v ./... | |
| # Runs go tests, uploads results, and skips quarantined flaky tests. | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@latest | |
| - name: Unit Tests | |
| id: run-tests | |
| continue-on-error: true | |
| run: gotestsum --format standard-quiet --junitfile test-results.xml -- ./... | |
| - name: Analyze and upload test results | |
| uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1 | |
| with: | |
| junit-file-path: test-results.xml | |
| trunk-org-slug: chainlink | |
| trunk-previous-step-outcome: ${{ steps.run-tests.outcome }} | |
| trunk-token: ${{ secrets.TRUNK_API_KEY }} | |
| trunk-job-url: ${{ format('https://github.com/{0}/actions/runs/{1}/job/{2}/attempts/{3}', github.repository, github.run_id, job.check_run_id, github.run_attempt) }} | |
| build-race-tests: | |
| name: race tests | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs.keystore-src == 'true' | |
| defaults: | |
| run: | |
| working-directory: keystore | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: ./.github/actions/setup-go | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Race Tests | |
| run: GORACE="log_path=$PWD/race" go test -race ./... | |
| - name: Print Races | |
| if: failure() | |
| id: print-races | |
| run: | | |
| find race.* | xargs cat > race.txt | |
| if [[ -s race.txt ]]; then | |
| cat race.txt | |
| fi | |
| - name: Upload Go test results | |
| if: always() | |
| uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
| with: | |
| name: go-race-results | |
| path: | | |
| ./race.* | |
| gate: | |
| name: summary gate | |
| runs-on: ubuntu-latest | |
| needs: [changes, run-tests, build-race-tests] | |
| if: always() | |
| steps: | |
| - name: Fail if any job ran and failed | |
| if: needs.changes.outputs.keystore-src == 'true' && | |
| (needs.run-tests.result != 'success' || | |
| needs.build-race-tests.result != 'success') | |
| run: exit 1 |