diff options
author | Aoang <aoang@x2ox.com> | 2022-03-20 21:34:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 14:34:31 +0100 |
commit | f3bce3aa6e9450a6f69ae3f98b6db0958d67233c (patch) | |
tree | e526052c5f4d730d6dec67c71dcdaa6ee8068b77 /.github | |
parent | Fix race conditions in tests (diff) | |
download | fasthttp-f3bce3aa6e9450a6f69ae3f98b6db0958d67233c.tar.gz fasthttp-f3bce3aa6e9450a6f69ae3f98b6db0958d67233c.tar.bz2 fasthttp-f3bce3aa6e9450a6f69ae3f98b6db0958d67233c.zip |
Add Go 1.18 support (#1253)
* Add Go 1.18 support
* fix Gosec Security Scanner
https://github.com/valyala/fasthttp/runs/5595618634?check_suite_focus=true
* fix https://github.com/securego/gosec/issues/469#issuecomment-1070608395 Gosec Github Action Doesn't Work at Go 1.18
* fix https://github.com/golangci/golangci-lint/pull/2438 golangci/golangci-lint Doesn't Work at Go 1.18
* fix golint unused
* fix golint: SA1019: netErr.Temporary is deprecated
* fix https://github.com/valyala/fasthttp/issues/1256
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/lint.yml | 11 | ||||
-rw-r--r-- | .github/workflows/security.yml | 11 | ||||
-rw-r--r-- | .github/workflows/test.yml | 2 |
3 files changed, 16 insertions, 8 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5130b05..6c2c7b0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,9 +11,12 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: 1.17.x + go-version: 1.18.x - run: go version - run: diff -u <(echo -n) <(gofmt -d .) - - uses: golangci/golangci-lint-action@v2 - with: - version: v1.28.3 + - name: Run golangci-lint + run: | # https://github.com/golangci/golangci-lint/pull/2438 + export PATH=$PATH:$(go env GOPATH)/bin + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.2 + golangci-lint run + diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 13b8fa7..07c61ed 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -8,9 +8,11 @@ jobs: test: strategy: matrix: - go-version: [1.17.x] + go-version: [1.18.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} + env: + GO111MODULE: on steps: - name: Install Go uses: actions/setup-go@v1 @@ -18,5 +20,8 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - - name: Security - run: go get github.com/securego/gosec/cmd/gosec; `go env GOPATH`/bin/gosec -exclude=G104,G304 ./... + - name: Run Gosec Security Scanner + run: | # https://github.com/securego/gosec/issues/469#issuecomment-1070608395 + export PATH=$PATH:$(go env GOPATH)/bin + go install github.com/securego/gosec/v2/cmd/gosec@latest + gosec -exclude=G104,G304,G402 ./... diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 068a6f5..429c155 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: test: strategy: matrix: - go-version: [1.15.x, 1.16.x, 1.17.x] + go-version: [1.15.x, 1.16.x, 1.17.x, 1.18.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: |