Skip to content

Commit

Permalink
update golangcilint to use action instead of manual install
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal committed Jan 2, 2024
1 parent 082cebd commit 086dd74
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: set up go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.21"
id: go
Expand All @@ -28,25 +28,24 @@ jobs:
go test -v -timeout=100s -covermode=count -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
cat $GITHUB_WORKSPACE/profile.cov_tmp > $GITHUB_WORKSPACE/profile.cov
- name: install golangci-lint and goveralls
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest

- name: run goveralls
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.50.0
go install github.com/mattn/goveralls@latest
- name: run linters
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions

- name: submit coverage
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
$(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
Expand Down

0 comments on commit 086dd74

Please sign in to comment.