Skip to content
Closed
12 changes: 8 additions & 4 deletions .github/workflows/keystore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ jobs:
- name: Build
run: go build -v ./...

# Runs go tests, uploads results, and skips quarantined flaky tests.
- name: Unit Tests
run: go test ./... -coverpkg=./... -coverprofile=coverage.txt
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Keystore Checks' step
Uses Step
uses 'smartcontractkit/.github/actions/branch-out-upload' with ref 'branch-out-upload/v1', not a pinned commit hash
with:
go-test-args: ./... -coverpkg=./... -coverprofile=coverage.txt
trunk-org-slug: chainlink
trunk-token: ${{ secrets.TRUNK_API_KEY }}

build-race-tests:
name: race tests
Expand Down Expand Up @@ -94,7 +99,6 @@ jobs:
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')
(needs.run-tests.result != 'success' ||
needs.build-race-tests.result != 'success')
run: exit 1

21 changes: 17 additions & 4 deletions .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: ./.github/actions/setup-go
with:
Expand All @@ -18,8 +17,22 @@
- name: Build
run: go build -v ./...

- name: Download gotestsum
run: go install gotest.tools/gotestsum@latest

- name: Unit Tests
run: go test ./... -coverpkg=./... -coverprofile=coverage.txt
id: run-tests
continue-on-error: true
run: gotestsum --junitfile test-results.xml -- ./... -coverpkg=./... -coverprofile=coverage.txt

- name: Analyze and upload test results
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'PKG Build and Test' step
Uses Step
uses 'smartcontractkit/.github/actions/branch-out-upload' with ref 'branch-out-upload/v1', not a pinned commit hash
with:
junit-file-path: test-results.xml
trunk-org-slug: smartcontractkit
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) }}

- name: Fuzz Tests
# the amount of --seconds here is subject to change based on how long the CI job takes in the future
Expand All @@ -34,11 +47,11 @@
if: failure()
run: find . -type f|fgrep '/testdata/fuzz/'|while read f; do echo $f; cat $f; done

- name: Upload Go test results
- name: Upload Go test coverage
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: go-test-results
name: go-test-coverage
path: |
./coverage.txt

Expand Down
Loading