Skip to content

combine interfaces (#978) #4382

combine interfaces (#978)

combine interfaces (#978) #4382

name: golangci-lint
on:
merge_group:
pull_request:
push:
branches:
- main
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Setup GitHub Token
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # setup-github-token@0.2.1
with:
aws-role-arn: ${{ secrets.GATI_AWS_ROLE_ARN_CHAINLINK_READ_ONLY }}
aws-lambda-url: ${{ secrets.GATI_LAMBDA_URL_RELENG }}
aws-region: ${{ secrets.GATI_AWS_REGION }}
set-git-config: true
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6 # v6
env:
GOPRIVATE: github.com/smartcontractkit/*
with:
cache: true
go-version-file: 'go.mod'
- name: Load tool versions
id: tool-versions
shell: bash
run: |
set -euo pipefail
source "${GITHUB_WORKSPACE}/tool-versions.env"
# Make it a step output
echo "golangci_lint_version=$VERSION_GOLANGCI_LINT" >> "$GITHUB_OUTPUT"
- name: Check golangci-lint for root
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 #v8
with:
version: "v${{ steps.tool-versions.outputs.golangci_lint_version }}"
working-directory: ./
args: --config .golangci.yaml ./...
- name: Check golangci-lint for build/devenv
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 #v8
with:
version: "v${{ steps.tool-versions.outputs.golangci_lint_version }}"
working-directory: build/devenv/
args: --config ../../.golangci.yaml ./...
- name: Check golangci-lint for build/devenv/fakes
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 #v8
with:
version: "v${{ steps.tool-versions.outputs.golangci_lint_version }}"
working-directory: build/devenv/fakes/
args: --config ../../../.golangci.yaml ./...