mirror of https://github.com/panjf2000/ants.git
chore: bump up some GitHub actions
This commit is contained in:
parent
74f5b2d330
commit
5c07bca122
|
@ -42,20 +42,20 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below).
|
# If this step fails, then you should remove it and run the build manually (see below).
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
@ -69,4 +69,4 @@ jobs:
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
|
@ -37,17 +37,17 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '^1.16'
|
go-version: '^1.16'
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup and run golangci-lint
|
- name: Setup and run golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: v1.51.2
|
version: v1.55.2
|
||||||
args: --timeout 5m -v -E gofumpt -E gocritic -E misspell -E revive -E godot
|
args: --timeout 5m -v -E gofumpt -E gocritic -E misspell -E revive -E godot
|
||||||
test:
|
test:
|
||||||
needs: lint
|
needs: lint
|
||||||
|
@ -60,12 +60,12 @@ jobs:
|
||||||
runs-on: ${{ matrix.os}}
|
runs-on: ${{ matrix.os}}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ jobs:
|
||||||
echo "GO_CACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
|
echo "GO_CACHE=$(go env GOCACHE)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Cache go modules
|
- name: Cache go modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ steps.go-env.outputs.GO_CACHE }}
|
${{ steps.go-env.outputs.GO_CACHE }}
|
||||||
|
@ -96,11 +96,12 @@ jobs:
|
||||||
run: go test -v -race -coverprofile="codecov.report" -covermode=atomic
|
run: go test -v -race -coverprofile="codecov.report" -covermode=atomic
|
||||||
|
|
||||||
- name: Upload code coverage report to Codecov
|
- name: Upload code coverage report to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
file: ./codecov.report
|
file: ./codecov.report
|
||||||
flags: unittests
|
flags: unittests
|
||||||
name: codecov-ants
|
name: codecov-ants
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
verbose: true
|
verbose: true
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
Loading…
Reference in New Issue