Skip to content

Merge pull request #42 from KusionStack/fix-wrong-goreleaser-config #84

Merge pull request #42 from KusionStack/fix-wrong-goreleaser-config

Merge pull request #42 from KusionStack/fix-wrong-goreleaser-config #84

Workflow file for this run

# Reference from:
# https://github.com/c-bata/go-prompt/blob/main/.github/workflows/test.yml
name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
Test:
name: Unit tests with coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- run: go vet ./...
- name: Running go tests with coverage
env:
GO111MODULE: on
run: make cover
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
Lint:
name: Lint checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Download golangci-lint
run: |
wget https://github.com/golangci/golangci-lint/releases/download/v1.41.0/golangci-lint-1.41.0-linux-amd64.tar.gz
tar -xvf ./golangci-lint-1.41.0-linux-amd64.tar.gz
- name: Running golangci-lint
env:
GO111MODULE: on
GOPATH: /home/runner/work/
run: GOLINTER=./golangci-lint-1.41.0-linux-amd64/golangci-lint make lint