diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfdcff4..44ae7f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,21 +17,12 @@ jobs: with: go-version: 1.15 - - name: Install dependencies - run: go get -u golang.org/x/lint/golint - - name: Build run: go build -v ./... - name: Test - run: go test -v ./... + run: go test -v ./... -covermode=count -coverprofile=cover.out - - name: Vet & Lint - run: | - go vet ./... - golint ./... - - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + - uses: codecov/codecov-action@v1 with: - version: v1.35.2 + flags: unittests diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..cde7250 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: lint + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + + - name: Install dependencies + run: go get -u golang.org/x/lint/golint + + - name: Vet & Lint + run: | + go vet ./... + golint ./... + + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.35.2