diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..45d6143 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,13 @@ +name: golangci-lint + +on: [ push ] +jobs: + 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 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..74cac49 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: test + +on: [ push, pull_request ] +jobs: + test: + strategy: + matrix: + go: [ + 1.13.x, + 1.14.x, + 1.15.x, + ] + os: [ + ubuntu-latest, + macos-latest, + windows-latest, + ] + + runs-on: ${{ matrix.os }} + + env: + OS: ${{ matrix.os }} + + steps: + - name: Install Go ${{ matrix.go }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Checkout + uses: actions/checkout@v2 + - name: Test + run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic . + - name: Upload code coverage + uses: codecov/codecov-action@v1 + if: matrix.go == '1.15.x' + with: + file: coverage.txt + env_vars: OS + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ddd4904..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: go - -go: - - 1.13.x - - 1.14.x - - 1.15.x - - master - -# Allow builds from tip to fail - they might be in an unstable state -jobs: - allow_failures: - - go: master - -os: - - linux - - osx - -env: - global: - - GO111MODULE=on - -script: - - go build - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 377858b..291abcb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.com/kernle32dll/jwtcache-go.svg?branch=master)](https://travis-ci.com/kernle32dll/jwtcache-go) +![test](https://github.com/kernle32dll/jwtcache-go/workflows/test/badge.svg) [![Go Reference](https://pkg.go.dev/badge/github.com/kernle32dll/jwtcache-go.svg)](https://pkg.go.dev/github.com/kernle32dll/jwtcache-go) [![Go Report Card](https://goreportcard.com/badge/github.com/kernle32dll/jwtcache-go)](https://goreportcard.com/report/github.com/kernle32dll/jwtcache-go) [![codecov](https://codecov.io/gh/kernle32dll/jwtcache-go/branch/master/graph/badge.svg)](https://codecov.io/gh/kernle32dll/jwtcache-go)