Skip to content

pkg/cosmos: add Context to ReaderWriter methods #2080

pkg/cosmos: add Context to ReaderWriter methods

pkg/cosmos: add Context to ReaderWriter methods #2080

Workflow file for this run

name: relay
on:
push:
jobs:
relay_run_unit_tests:
name: Relay Run Unit Tests
runs-on: ubuntu-latest
env:
DATABASE_URL: postgres://postgres@localhost:5432/postgres?sslmode=disable
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout sources
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Install Nix
uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: "sandbox = false"
- name: Cache Nix
uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
name: chainlink-cosmos
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Compile relay
run: nix develop -c go build -v ./pkg/cosmos/...
- name: Run unit tests
run: nix develop -c make test_relay_unit
- name: Run tests with the race detector enabled
run: nix develop -c make test_relay_unit_race
- name: Upload Go test results
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: go-test-results
path: |
./unit_coverage.txt
./race_coverage.txt
check-tidy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: "go.mod"
- name: Ensure "make gomodtidy" has been run
run: |
make gomodtidy
git diff --exit-code
- name: Ensure "make generate" has been run
run: |
make rm-mocked
make generate
git diff --exit-code