-
Notifications
You must be signed in to change notification settings - Fork 44
55 lines (53 loc) · 2.18 KB
/
relay.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: relay
on:
pull_request:
push:
branches:
- develop
jobs:
relay_run_unit_tests:
name: Relay Run Unit Tests
runs-on: ubuntu-latest
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"}'
- 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: |
go mod tidy
echo "if this fails run 'go mod tidy' 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: 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: |
./race_coverage.txt
./integration_coverage.txt