publish df1 sdk #7303
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: relay | |
on: | |
pull_request: | |
push: | |
branches: | |
- develop | |
jobs: | |
relay_run_unit_tests: | |
name: Relay Run Unit Tests | |
permissions: | |
contents: read | |
actions: read | |
env: | |
DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable | |
runs-on: ubuntu-latest-8cores-32GB | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
check-latest: true | |
- 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: Build | |
run: go build ./pkg/... | |
- name: Get core ref | |
id: get-ref | |
uses: ./.github/actions/get-core-ref | |
- name: Setup Test DB | |
id: setup-testdb | |
uses: ./.github/actions/setup-testdb | |
with: | |
core-ref: ${{ steps.get-ref.outputs.core-ref }} | |
- name: Test | |
env: | |
CL_DATABASE_URL: ${{ steps.setup-testdb.outputs.cl-db-url }} | |
run: | | |
set -o pipefail | |
go test ./pkg/... -tags integration -covermode=atomic -coverpkg=./... -coverprofile=integration_coverage.txt 2>&1 | tee /tmp/gotest.log | |
- name: Test with the race detector enabled | |
env: | |
CL_DATABASE_URL: ${{ steps.setup-testdb.outputs.cl-db-url }} | |
run: GORACE="log_path=$PWD/race" go test ./pkg/... -race -count=5 -timeout=15m -covermode=atomic -coverpkg=./... -coverprofile=race_coverage.txt | |
- name: Upload Go test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: go-relay-test-results | |
path: | | |
/tmp/gotest.log | |
./integration_coverage.txt | |
./race.* | |
./race_coverage.txt |