From ceed9b2c264086c5e7632f0ba74f6956c751e59a Mon Sep 17 00:00:00 2001 From: Vasiliy Vasilyuk Date: Wed, 18 Nov 2020 01:10:52 +0300 Subject: [PATCH] Configure new ci https://github.com/actions/setup-go/issues/12#issuecomment-521972456 --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 25 -------------------- Makefile | 3 --- 3 files changed, 51 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7079be0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: Continuous Integration + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Build + strategy: + matrix: + go: + - '1.15' + - '1.14' + - '1.13' + - '1.12' + - '1.11' + - '1.10' + - '1.9' + - '1.8' + os: + - 'ubuntu-18.04' + - 'macos-10.15' + runs-on: ${{ matrix.os }} + steps: + - name: Set up Go ${{ matrix.go }} + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go }} + env: + GOPATH: $HOME + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Running static checks + run: | + export GOPATH=$HOME/go + export GOBIN=$(go env GOPATH)/bin + export PATH=$PATH:$GOPATH + export PATH=$PATH:$GOBIN + mkdir -p $GOPATH/pkg + mkdir -p $GOBIN + mkdir -p $GOPATH/src/github.com/$GITHUB_REPOSITORY + mv $(pwd)/* $GOPATH/src/github.com/$GITHUB_REPOSITORY + cd $GOPATH/src/github.com/$GITHUB_REPOSITORY + if [ "${{ matrix.go }}" == "1.15" ]; \ + then make ci; \ + else go test ./... -count=10 -race; \ + fi; diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 94fc20a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - go: 1.8.x - - go: 1.9.x - - go: 1.10.x - - go: 1.11.x - - go: 1.12.x - - go: 1.x - env: GO111MODULE=on - - go: tip - -script: -- > - if [ "${TRAVIS_GO_VERSION}" = "1.x" ]; - then make ci; - else go test ./... -count=1 -race; - fi; -- make build - -after_success: -- bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index 3fabb26..11636c4 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,4 @@ checkstate: tools ## Checking the relevance of dependencies, and tools. Also, th @echo 'checking the relevance of the committed generated files' @go generate @exit $$(git status -s | wc -l) - @echo 'checking the relevance of the committed golden files' - @make testup - @exit $$(git status -s | wc -l) @go mod verify