Skip to content

Commit

Permalink
style: improved ci
Browse files Browse the repository at this point in the history
Change-Id: I049c62d0408a7bee322194138bc5790bfe080596
  • Loading branch information
andeya committed Dec 9, 2022
1 parent 6480f51 commit 29360cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: golangci-lint
name: go-ci

on:
push:
Expand All @@ -7,14 +7,23 @@ on:
pull_request:

jobs:
golangci:
name: lint
test-and-lint:
name: test-and-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.4
- uses: actions/checkout@v3
- name: Test
run: make coverage
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cover.out
flags: unittests
verbose: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -25,7 +34,7 @@ jobs:
working-directory: ./

# Optional: golangci-lint command line arguments.
args: --timeout 600s --max-same-issues 50
args: --print-resources-usage --fast --timeout 20m0s --max-same-issues 50

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/go.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@

.idea
/iter1/
cover.html
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ watch-bench:
reflex -t 50ms -s -- sh -c 'go test -benchmem -count 3 -bench ./...'

coverage:
${BIN} test -v -coverprofile=cover.out -covermode=atomic .
${BIN} test -v -coverprofile=cover.out -covermode=atomic ./...
${BIN} tool cover -html=cover.out -o cover.html

# tools
Expand All @@ -30,9 +30,9 @@ tools:
go mod tidy

lint:
golangci-lint run --timeout 600s --max-same-issues 50 ./...
golangci-lint run --print-resources-usage --fast --timeout 20m0s --max-same-issues 50 ./...
lint-fix:
golangci-lint run --timeout 600s --max-same-issues 50 --fix ./...
golangci-lint run --print-resources-usage --fast --timeout 20m0s --max-same-issues 50 --fix ./...

audit:
${BIN} mod tidy
Expand Down

0 comments on commit 29360cb

Please sign in to comment.