From 36d7fd0beb26b4d028c167beb98a4480dad53c3f Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Sat, 2 Jan 2021 16:42:23 +0000 Subject: [PATCH] Migrate CI to GitHub Actions --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 17 --------------- 2 files changed, 46 insertions(+), 17 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..835dc86 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: ci + +on: + push: + branches: [ master ] + tags: [ v* ] + pull_request: + branches: [ master ] + +jobs: + matrix: + strategy: + matrix: + go-version: [1.15.x, 1.14.x, 1.13.x] + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v2 + - run: go get -v -t -d ./... + - run: go test -v ./... + coverage: + runs-on: ubuntu-latest + steps: + - name: Coverage on latest 1.x Go + uses: actions/setup-go@v2 + with: + go-version: ^1.* + - uses: actions/checkout@v2 + - run: go get -v -t -d ./... + - run: go test -v -coverprofile=coverage.out -covermode=count ./... + - uses: codecov/codecov-action@v1 + with: + file: ./coverage.out + fail_ci_if_error: true + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.34 + only-new-issues: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0c9ca71..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: go - -go: - - 1.13.x - - 1.14.x - - 1.15.x - - tip - -install: - - go get -t -v ./... - - go get -v golang.org/x/tools/cmd/cover - -script: - - go test -v -coverprofile=coverage.txt -covermode=count ./... - -after_success: - - bash <(curl -s https://codecov.io/bash)