Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up go and pkgs version #10

Merged
merged 2 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,31 @@ jobs:
name: Test
strategy:
matrix:
go_version: [1.17]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
- name: Check out source code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go_version }}
go-version-file: go.mod

- name: Check out source code
uses: actions/checkout@v2
- name: Run lint
if: matrix.platform == 'ubuntu-latest'
uses: reviewdog/action-golangci-lint@v2

- name: Test
run: make ci
if: matrix.platform != 'windows-latest'
run: make ci

- name: Test
if: matrix.platform == 'windows-latest'
run: |
go test ./...
go test ./... -tags integration
shell: cmd
if: matrix.platform == 'windows-latest'

- name: Run octocov
if: matrix.platform == 'ubuntu-latest'
Expand Down
16 changes: 16 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
linters:
fast: false
enable:
- misspell
- gosec
linters-settings:
errcheck:
check-type-assertions: true
staticcheck:
go: 1.16
misspell:
locale: US
ignore-words: []
issues:
exclude:
- SA3000
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ BUILD_LDFLAGS = -X $(PKG).commit=$(COMMIT) -X $(PKG).date=$(DATE)

default: test

ci: depsdev test test_integration sec
ci: depsdev test test_integration

test:
go test ./... -coverprofile=coverage.out -covermode=count

test_integration: build
go test ./... -tags integration

sec:
gosec ./...
lint:
golangci-lint run ./...

build:
go build -ldflags="$(BUILD_LDFLAGS)"
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module github.com/k1LoW/colr

go 1.17
go 1.19

require (
github.com/labstack/gommon v0.3.1
github.com/mattn/go-colorable v0.1.12
github.com/mattn/go-isatty v0.0.14
github.com/spf13/cobra v1.2.1
github.com/labstack/gommon v0.4.0
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.16
github.com/spf13/cobra v1.6.1
)

require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
golang.org/x/sys v0.1.0 // indirect
)