Skip to content

chore(ci): github actions maintenance #4008

chore(ci): github actions maintenance

chore(ci): github actions maintenance #4008

Workflow file for this run

name: Relayer
on:
push:
branches:
- develop
- main
pull_request:
jobs:
relayer_run_unit_tests:
name: Run Unit Tests ${{ matrix.test-type.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-type:
- name: test-unit-go
id: unit
- name: test-unit-go-race
id: race
- name: test-integration-go
id: integration
steps:
- name: Checkout sources
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build
run: nix develop -c sh -c "make build-go-relayer"
- name: Run ${{ matrix.test-type.name }}
run: nix develop -c sh -c "make ${{ matrix.test-type.name }} LOG_PATH=/tmp/gotest.log"
- name: Upload Golangci relayer results
if: always()
uses: actions/upload-artifact@v4
with:
name: go-unit-tests-results-${{ matrix.test-type.id }}
path: |
/tmp/gotest.log
./relayer/output.txt
./relayer/coverage.txt
./relayer/race_coverage.txt
check-tidy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: "relayer/go.mod"
- name: Setup GitHub Token
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@setup-github-token/v1
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }}
aws-region: ${{ secrets.QA_AWS_REGION }}
- name: Setup Go with private repo access
uses: ./.github/actions/setup-github-private-access
with:
gati_token: ${{ steps.setup-github-token.outputs.access-token }}
- 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 --stat --exit-code