From 2f1ec406dfa856a4b8378ef837061abc2a0ce01b Mon Sep 17 00:00:00 2001 From: rui Date: Wed, 15 Dec 2021 16:00:02 -0500 Subject: [PATCH] ci: migrate from travis to github action (#391) * ci: add github action workflow * remove travis * drop go1.10.x and go1.9.x * add go1.17 --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 29 ----------------------------- 2 files changed, 31 insertions(+), 29 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 00000000..ffbc5871 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: ci + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go-version: + - 1.17.x + - 1.16.x + - 1.15.x + - 1.14.x + - 1.13.x + - 1.12.x + - 1.11.x + steps: + - uses: actions/checkout@v2 + - name: Set up Go ${{ matrix.go-version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Test + run: | + go vet ./... + go test -tags CI -race ./... + env: + GOPATH: /home/runner/go diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6cfa4982..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: go - -# prevent double test runs for PRs -branches: - only: - - "master" - -# In theory, older versions would probably work fine, but since this isn't a -# library, I'm not going to worry about older versions for now. -go: - - tip - - 1.16.x - - 1.15.x - - 1.14.x - - 1.13.x - - 1.12.x - - 1.11.x - - 1.10.x - - 1.9.x - -# don't call go get ./... because this hides when deps are -# not packaged into the vendor directory. -install: true - -# don't call go test -v because we want to be able to only show t.Log output when -# a test fails -script: - - go vet ./... - - go test -tags CI -race ./... \ No newline at end of file