diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..75312e1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: test +on: [push, pull_request] + +env: + GOPROXY: https://proxy.golang.org,direct + +jobs: + test: + strategy: + matrix: + go-version: [1.19.x, 1.20.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Test + run: go test ./... -v -cover + + - name: Race + run: go test ./... -race diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7e1d84e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: go - -go: - - 1.7.x - - 1.8.x - - 1.9.x - - "1.10.x" - - "1.11.x" - - "1.12.x" - - tip - diff --git a/README.md b/README.md index 3a3683e..1c730fd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# rehttp [![build status](https://secure.travis-ci.org/PuerkitoBio/rehttp.png)](http://travis-ci.org/PuerkitoBio/rehttp) [![Go Reference](https://pkg.go.dev/badge/github.com/PuerkitoBio/rehttp.svg)](https://pkg.go.dev/github.com/PuerkitoBio/rehttp) +# rehttp [![Build Status](https://github.com/PuerkitoBio/rehttp/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/PuerkitoBio/rehttp/actions) [![Go Reference](https://pkg.go.dev/badge/github.com/PuerkitoBio/rehttp.svg)](https://pkg.go.dev/github.com/PuerkitoBio/rehttp) Package rehttp implements an HTTP Transport (an `http.RoundTripper`) that handles retries. See the [godoc][] for details.