Skip to content
Myr

chore(ci): use golangci-lint-action (#1477)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Matthieu MOREL · committed by GitHub · parent 1beb476 · Browse files · 3 files+101 added−90 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Diff stats

3 files+101 added−90 removed

  • other:+101 added−90 removed

3 files+101 added−90 removed

added:.github/workflows/test.yml+100 added
1name: Test23on:4 push:5 pull_request:67env:8 GO111MODULE: on910jobs:1112 golangci-lint:13 runs-on: ubuntu-latest14 steps:1516 - uses: actions/setup-go@v217 with:18 go-version: '1.17'1920 - uses: actions/checkout@v22122 - uses: golangci/golangci-lint-action@v223 with:24 version: latest25 args: --verbose2627 test-unix:28 strategy:29 fail-fast: false30 matrix:31 platform:32 - ubuntu33 - macOS34 go:35 - 1436 - 1537 - 1638 - 1739 name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x'40 runs-on: ${{ matrix.platform }}-latest41 steps:4243 - uses: actions/setup-go@v244 with:45 go-version: 1.${{ matrix.go }}.x4647 - uses: actions/checkout@v24849 - uses: actions/cache@v250 with:51 path: ~/go/pkg/mod52 key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}53 restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-5455 - run: |56 export GOBIN=$HOME/go/bin57 case "${{ matrix.go }}" in58 16|17) _version='@latest';;59 *) _version='';;60 esac61 go install github.com/kyoh86/richgo"${_version}"62 go install github.com/mitchellh/gox"${_version}"6364 - run: PATH=$HOME/go/bin/:$PATH make test cobra_generator6566 test-win:67 name: MINGW6468 defaults:69 run:70 shell: msys2 {0}71 runs-on: windows-latest72 steps:7374 - shell: bash75 run: git config --global core.autocrlf input7677 - uses: msys2/setup-msys2@v278 with:79 msystem: MINGW6480 update: true81 install: >82 git83 make84 unzip85 mingw-w64-x86_64-go8687 - uses: actions/checkout@v28889 - uses: actions/cache@v290 with:91 path: ~/go/pkg/mod92 key: ${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}93 restore-keys: ${{ runner.os }}-${{ matrix.go }}-9495 - run: |96 export GOBIN=$HOME/go/bin97 go install github.com/kyoh86/richgo@latest98 go install github.com/mitchellh/gox@latest99100 - run: PATH=$HOME/go/bin:$PATH make test cobra_generator
deleted:.github/workflows/Test.yml-89 removed
1name: Test23on:4 push:5 pull_request:67env:8 GO111MODULE: on910jobs:111213 test-unix:14 strategy:15 fail-fast: false16 matrix:17 platform:18 - ubuntu19 - macOS20 go:21 - 1422 - 1523 - 1624 - 1725 name: '${{ matrix.platform }} | 1.${{ matrix.go }}.x'26 runs-on: ${{ matrix.platform }}-latest27 steps:2829 - uses: actions/setup-go@v230 with:31 go-version: 1.${{ matrix.go }}.x3233 - uses: actions/checkout@v23435 - uses: actions/cache@v236 with:37 path: ~/go/pkg/mod38 key: ${{ runner.os }}-1.${{ matrix.go }}.x-${{ hashFiles('**/go.sum') }}39 restore-keys: ${{ runner.os }}-1.${{ matrix.go }}.x-4041 - run: |42 export GOBIN=$HOME/go/bin43 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest44 case "${{ matrix.go }}" in45 16|17) _version='@latest';;46 *) _version='';;47 esac48 go install github.com/kyoh86/richgo"${_version}"49 go install github.com/mitchellh/gox"${_version}"5051 - run: PATH=$HOME/go/bin/:$PATH make525354 test-win:55 name: MINGW6456 defaults:57 run:58 shell: msys2 {0}59 runs-on: windows-latest60 steps:6162 - shell: bash63 run: git config --global core.autocrlf input6465 - uses: msys2/setup-msys2@v266 with:67 msystem: MINGW6468 update: true69 install: >70 git71 make72 unzip73 mingw-w64-x86_64-go7475 - uses: actions/checkout@v27677 - uses: actions/cache@v278 with:79 path: ~/go/pkg/mod80 key: ${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}81 restore-keys: ${{ runner.os }}-${{ matrix.go }}-8283 - run: |84 export GOBIN=$HOME/go/bin85 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest86 go install github.com/kyoh86/richgo@latest87 go install github.com/mitchellh/gox@latest8889 - run: PATH=$HOME/go/bin:$PATH make
modified:Makefile+1 added-1 removed
21 unmodified lines
22lint:23 $(info ******************** running lint tools ********************)24 golangci-lint run -v2526test: install_deps lint26test: install_deps27 $(info ******************** running tests ********************)28 richgo test -v ./...2930cobra_generator: install_deps
10 unmodified lines