Run go test on github actions (#1047)

* Run go test on github actions

travis-ci.org has stopped.
See also: https://github.com/curl/curl/issues/7150

Downside: github actions don't support ppc64le

* Run less

* delete .travis.yml

* Remove travis + minor lint fixes
This commit is contained in:
Erik Dubbelboer
2021-06-18 13:36:54 +02:00
committed by GitHub
parent be13b504ab
commit 87fc95849c
9 changed files with 45 additions and 84 deletions
+6 -4
View File
@@ -1,7 +1,9 @@
name: lint
on: [push, pull_request]
name: Lint
on:
push:
branches:
- master
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
+6 -2
View File
@@ -1,10 +1,14 @@
on: [push, pull_request]
name: Security
on:
push:
branches:
- master
pull_request:
jobs:
test:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x]
go-version: [1.16.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
+21
View File
@@ -0,0 +1,21 @@
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- run: go version
- run: go test ./...
- run: go test -race ./...
-67
View File
@@ -1,67 +0,0 @@
language: go
arch:
- amd64
- ppc64le
dist: bionic
os:
- linux
- osx
- windows
go:
- 1.16.x
- 1.15.x
- 1.14.x
- 1.13.x
- 1.12.x
- tip
script:
- go test -v ./...
env:
global:
secure: 'v/F0oI9zE9mcpEp4AVdHzSSHbe5ZFtH6B0i/BiUXKdQRQ10+JMPDOFRJQti7yxjMwltyd/QSFmR50Fl108sQYpo4xdlEXMHp2Y6OAN6crrp6PuHbLYgDWu3df/cH7/BqDyIq1uX8KZEeQssnygYN8hN4tpJCUg+NIb40Lm57Zsodt8DVjjyDWQQFDL7soNyAwGwQIqEyJsn+NUieXWEB1Qnt0xUtPIReuLlrwXR8wC1nLEjG9yz4ftDHHQdhVbO2b+xGWyaJ7QB5ixztaQP8Jnny6kSW9j6zEhJVuzdZ6d3xz23ibCbzSXBHdIUEI9u6ifQj8BYXr8fFS0FB3++IxgAYSs3ybZ+qEwuAxSBBm6YNW+3FrfDknVwTQscjKqnXPisjUqaRC9b31hke0tXzBq1488hE+wxMXeDM4LwWT5IMEO2gz0WGQXxmdVit72DIjCZxJkf1TvZZ0YH7Y//6wJTYYP9xulsy4gqu8CuFdWiF3fiGc3p5DTIS75nJ/Yy76Sa1pRPASKCujfLxtHE6Mt0XKvSolIXklYIzBkjN6vn80N6JIrqtqlimBGPW/Ec6+dwbmRe2AcOKRl4y7pZsGYhJhqdue1mucUYO/e2QeBZJGkqqG+zF5AW0v8x29BHvMwViAonc8o9eelkJ8khYzc/Qeq05pZnR/N/Pqfc+68k='
before_install:
- go get -t -v ./...
jobs:
allow_failures:
- go: tip
include:
- stage: cross compilation
os:
- linux
script:
- GOOS=linux go build
- GOOS=darwin go build
- GOOS=freebsd go build
- GOOS=windows go build
- GOARCH=386 go build
- stage: cross compilation
os:
- osx
script:
- GOOS=linux go build
- GOOS=darwin go build
- GOOS=freebsd go build
- GOOS=windows go build
- stage: race detector
os:
- linux
script:
- go test -race -v ./...
- stage: race detector
os:
- osx
script:
- go test -race -v ./...
- stage: race detector
arch: ppc64le
os:
- linux
script:
- go test -race -v ./...
+1 -1
View File
@@ -1,4 +1,4 @@
# fasthttp [![Build Status](https://travis-ci.org/valyala/fasthttp.svg?branch=master)](https://travis-ci.org/valyala/fasthttp?branch=master) [![GoDoc](https://godoc.org/github.com/valyala/fasthttp?status.svg)](http://godoc.org/github.com/valyala/fasthttp) [![Go Report](https://goreportcard.com/badge/github.com/valyala/fasthttp)](https://goreportcard.com/report/github.com/valyala/fasthttp) [![Sourcegraph](https://sourcegraph.com/github.com/valyala/fasthttp/-/badge.svg)](https://sourcegraph.com/github.com/valyala/fasthttp?badge)
# fasthttp [![GoDoc](https://godoc.org/github.com/valyala/fasthttp?status.svg)](http://godoc.org/github.com/valyala/fasthttp) [![Go Report](https://goreportcard.com/badge/github.com/valyala/fasthttp)](https://goreportcard.com/report/github.com/valyala/fasthttp) [![Sourcegraph](https://sourcegraph.com/github.com/valyala/fasthttp/-/badge.svg)](https://sourcegraph.com/github.com/valyala/fasthttp?badge)
![FastHTTP  Fastest and reliable HTTP implementation in Go](https://github.com/fasthttp/docs-assets/raw/master/banner@0.5.png)
+1 -1
View File
@@ -22,7 +22,7 @@ func FasthttpHTTPDialer(proxy string) fasthttp.DialFunc {
return FasthttpHTTPDialerTimeout(proxy, 0)
}
// FasthttpHTTPDialer returns a fasthttp.DialFunc that dials using
// FasthttpHTTPDialerTimeout returns a fasthttp.DialFunc that dials using
// the provided HTTP proxy using the given timeout.
//
// Example usage:
+6 -7
View File
@@ -14,6 +14,12 @@ import (
"github.com/valyala/fasthttp"
)
const (
httpsScheme = "https"
httpScheme = "http"
tlsPort = "443"
)
// FasthttpProxyHTTPDialer returns a fasthttp.DialFunc that dials using
// the the env(HTTP_PROXY, HTTPS_PROXY and NO_PROXY) configured HTTP proxy.
//
@@ -32,13 +38,6 @@ func FasthttpProxyHTTPDialer() fasthttp.DialFunc {
// c := &fasthttp.Client{
// Dial: FasthttpProxyHTTPDialerTimeout(time.Second * 2),
// }
const (
httpsScheme = "https"
httpScheme = "http"
tlsPort = "443"
)
func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) fasthttp.DialFunc {
proxier := httpproxy.FromEnvironment().ProxyFunc()
+3 -1
View File
@@ -22,7 +22,9 @@ var (
defaultLogger = Logger(log.New(os.Stderr, "", log.LstdFlags))
// ErrOverRecovery is returned when the times of starting over child prefork processes exceed
// the threshold.
ErrOverRecovery = errors.New("exceeding the value of RecoverThreshold")
ErrOverRecovery = errors.New("exceeding the value of RecoverThreshold")
// ErrOnlyReuseportOnWindows is returned when Reuseport is false.
ErrOnlyReuseportOnWindows = errors.New("windows only supports Reuseport = true")
)
+1 -1
View File
@@ -395,6 +395,6 @@ func TestURIWithQuerystringOverride(t *testing.T) {
uriString := string(u.RequestURI())
if uriString != "/?q1=foo&q2=bar&q4=quux" {
t.Fatalf("Expected Querystring to be overriden but was %s ", uriString)
t.Fatalf("Expected Querystring to be overridden but was %s ", uriString)
}
}