forked from quic-go/quic-go
run golangci-lint on Github Actions instead of Travis
This commit is contained in:
13
.github/workflows/lint.yml
vendored
Normal file
13
.github/workflows/lint.yml
vendored
Normal 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
|
||||||
@@ -13,7 +13,6 @@ env:
|
|||||||
global:
|
global:
|
||||||
- TIMESCALE_FACTOR=20
|
- TIMESCALE_FACTOR=20
|
||||||
matrix:
|
matrix:
|
||||||
- TRAVIS_GOARCH=amd64 TESTMODE=lint
|
|
||||||
- TRAVIS_GOARCH=amd64 TESTMODE=unit
|
- TRAVIS_GOARCH=amd64 TESTMODE=unit
|
||||||
- TRAVIS_GOARCH=amd64 TESTMODE=integration
|
- TRAVIS_GOARCH=amd64 TESTMODE=integration
|
||||||
- TRAVIS_GOARCH=386 TESTMODE=unit
|
- TRAVIS_GOARCH=386 TESTMODE=unit
|
||||||
@@ -30,10 +29,6 @@ before_install:
|
|||||||
- travis_retry go get -t ./...
|
- travis_retry go get -t ./...
|
||||||
|
|
||||||
script:
|
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
|
- .travis/script.sh
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ "${TESTMODE}" == "lint" ]; then
|
|
||||||
.travis/no_ginkgo.sh
|
|
||||||
./bin/golangci-lint run ./...
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${TESTMODE}" == "unit" ]; then
|
if [ "${TESTMODE}" == "unit" ]; then
|
||||||
ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
|
ginkgo -r -v -cover -randomizeAllSpecs -randomizeSuites -trace -skipPackage integrationtests,benchmark
|
||||||
# run unit tests with the Go race detector
|
# run unit tests with the Go race detector
|
||||||
|
|||||||
Reference in New Issue
Block a user