Skip to content

chore: lint ics23 golang code #86

chore: lint ics23 golang code

chore: lint ics23 golang code #86

Workflow file for this run

name: Go
on:
pull_request:
paths:
- go/**
- .github/workflows/go.yml
push:
branches:
- master
permissions:
contents: read
concurrency:
group: go-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
# ci is set to go1.19 to match developer setups
go-version: "1.21"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.54.2
working-directory: go
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: test
working-directory: ./go
run: make test
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run coverage
working-directory: ./go
run: go test -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: go/coverage.txt
flags: go
fail_ci_if_error: true