Skip to content

update

update #7

Workflow file for this run

name: Local Golang
on:
push:
branches:
- 'zakir/**'
#pull_request_review:
# types:
# - submitted
permissions:
contents: read
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
custom-lint:
runs-on: ubuntu-latest
#if: github.event.review.state == 'approved'
steps:
- uses: actions/checkout@v4
- run: |
curl -sLO https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb
sudo dpkg -i ripgrep_14.1.0-1_amd64.deb
- run: make custom-lint
mock:
runs-on: ubuntu-latest
#if: github.event.review.state == 'approved'
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
x/crosschain/mock/expected_keepers_mocks.go
Makefile
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: |
make mocks
git diff --exit-code
test:
runs-on: ubuntu-latest
#if: github.event.review.state == 'approved'
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**.go
go.mod
go.sum
.golangci.yml
.github/workflows/golang.yml
!**.pb.go
!**.pb.gw.go
!**.pulsar.go
!**.sol.go
!statik.go
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Cache Go Modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-golang
restore-keys: |
${{ runner.os }}-golang
- name: Install Dependencies
run: go mod download
- run: make test
lint:
runs-on: ubuntu-latest
#if: github.event.review.state == 'approved'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: |
version=$(grep golangci_version= ./Makefile | awk -F '=' '{print $2}')
echo "GOLANGCI_VERSION=$version" >> $GITHUB_ENV
- name: Cache Go-Lint
uses: actions/cache@v3
with:
path: |
~/.cache/golangci-lint
key: ${{ runner.os }}-golangci
restore-keys: |
${{ runner.os }}-golangci
- uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --timeout 10m