From d7247c595176a832e412cb3e1ff6f34ae0e71916 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 30 Aug 2020 01:38:20 +0200 Subject: [PATCH] Add linter workflow --- .github/workflows/{go.yml => build.yml} | 6 +++--- .github/workflows/lint.yml | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) rename .github/workflows/{go.yml => build.yml} (86%) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/go.yml b/.github/workflows/build.yml similarity index 86% rename from .github/workflows/go.yml rename to .github/workflows/build.yml index faae8a9..330087e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,9 @@ jobs: test: strategy: matrix: - go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x] - platform: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.platform }} + go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} env: GO111MODULE: "on" COLORTERM: "truecolor" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..e917f47 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: lint +on: [push, pull_request] + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. + version: v1.30 + # Optional: golangci-lint command line arguments. + args: --issues-exit-code=0 + # Optional: working directory, useful for monorepos + # working-directory: somedir + # Optional: show only new issues if it's a pull request. The default value is `false`. + only-new-issues: true