[NONEVM-1091] - Refactor/Setup CR init and cfg and codec init #4637
This file contains 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: relay | |
on: | |
pull_request: | |
push: | |
branches: | |
- develop | |
jobs: | |
relay_run_unit_tests: | |
name: Relay Run Unit Tests | |
runs-on: ubuntu-latest-8cores-32GB | |
steps: | |
- name: Collect Metrics | |
id: collect-gha-metrics | |
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0 | |
with: | |
id: solana-relay-unit | |
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | |
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | |
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} | |
this-job-name: Relay Run Unit Tests | |
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' | |
continue-on-error: true | |
- name: Checkout sources | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- name: Setup go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version-file: "go.mod" | |
check-latest: true | |
- name: Install gotestloghelper | |
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/gotestloghelper@latest | |
- name: Check go mod tidy | |
run: | | |
make gomodtidy | |
echo "if this fails run 'make gomodtidy' to fix" | |
git diff --minimal --exit-code | |
- name: Check go generate | |
run: | | |
make rm-mocked | |
make generate | |
echo "if this fails run 'make generate' to fix" | |
git diff --stat --exit-code | |
- name: Install Solana CLI | |
run: ./scripts/install-solana-ci.sh | |
- name: Compilation check | |
run: go test -run=xxx ./... # check compilation across tests + relayer / monitoring go code without running | |
- name: Build | |
run: go build -v ./pkg/... | |
- name: Test | |
run: | | |
set -o pipefail | |
go test ./pkg/... -json -tags integration -covermode=atomic -coverpkg=./... -coverprofile=integration_coverage.txt 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci | |
- name: Test with the race detector enabled | |
run: go test ./pkg/... -v -race -count=10 -timeout=15m -covermode=atomic -coverpkg=./... -coverprofile=race_coverage.txt | |
- name: Upload Go test results | |
if: always() | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: go-relay-test-results | |
path: | | |
/tmp/gotest.log | |
./race_coverage.txt | |
./integration_coverage.txt |