run golangci-lint on Github Actions instead of Travis

This commit is contained in:
Marten Seemann
2020-08-06 17:10:43 +07:00
parent 32b3ce645a
commit 562cf11b11
4 changed files with 13 additions and 10 deletions

13
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check that no non-test files import Ginkgo or Gomega
run: .github/workflows/no_ginkgo.sh
- name: golangci-lint
uses: golangci/golangci-lint-action@v1
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

View File

@@ -13,7 +13,6 @@ env:
global:
- TIMESCALE_FACTOR=20
matrix:
- TRAVIS_GOARCH=amd64 TESTMODE=lint
- TRAVIS_GOARCH=amd64 TESTMODE=unit
- TRAVIS_GOARCH=amd64 TESTMODE=integration
- TRAVIS_GOARCH=386 TESTMODE=unit
@@ -30,10 +29,6 @@ before_install:
- travis_retry go get -t ./...
script:
- |
if [ ${TESTMODE} == "lint" ]; then
travis_retry curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.27.0
fi
- .travis/script.sh

View File

@@ -2,11 +2,6 @@
set -ex
if [ "${TESTMODE}" == "lint" ]; then
.travis/no_ginkgo.sh
./bin/golangci-lint run ./...
fi
if [ "${TESTMODE}" == "unit" ]; then
ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
# run unit tests with the Go race detector