From 71130c8caa28c7b6a8f66a46934ca6d8268d7762 Mon Sep 17 00:00:00 2001 From: John Weldon Date: Tue, 5 Apr 2022 17:54:15 -0700 Subject: [PATCH] Use github actions instead of travis (#36) --- .github/workflows/pr.yml | 48 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 43 ----------------------------------- 2 files changed, 48 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/pr.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..e55d139 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,48 @@ +name: PR + +on: + pull_request: + branches: [ master ] + + +jobs: + gomod: + runs-on: ubuntu-latest + strategy: + matrix: + go: [ + '1.18', + '1.17', + '1.16', + '1.15', + '1.14', + '1.13', + ] + name: Go ${{ matrix.go }}.x PR Validate + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Version + run: go version + - name: Build and Validate + run: | + go vet . + go test . + go test -cover -race -cpu 1,2,4 . + go build . + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.45 + only-new-issues: true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 764b541..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: go - -go: - - 1.2.x - - 1.6.x - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.14.x - - tip - -os: - - linux - -arch: - - amd64 - - ppc64le - -dist: xenial - -env: - - GOARCH=amd64 - -jobs: - include: - - os: windows - go: 1.14.x - - os: osx - go: 1.14.x - - os: linux - go: 1.14.x - arch: arm64 - - os: linux - go: 1.14.x - env: - - GOARCH=386 - -script: - - go test -v -cover ./... || go test -v ./... -matrix: - allowfailures: - go: 1.2.x