mirror of https://github.com/gofiber/fiber.git
Rollback changes to go.mod file (#2614)
* Rollback changes to go.mod file * Format workflow files with prettier, use go1.20 for go.mod filepull/2615/head
parent
d44b03e60a
commit
8761d948ba
|
@ -1,21 +1,23 @@
|
|||
name: Auto labeler
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [ opened, edited, milestoned ]
|
||||
pull_request_target:
|
||||
types: [ opened ]
|
||||
issues:
|
||||
types: [opened, edited, milestoned]
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
checks: write
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check Labels
|
||||
id: labeler
|
||||
uses: fuxingloh/multi-labeler@v2
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
labeler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check Labels
|
||||
id: labeler
|
||||
uses: fuxingloh/multi-labeler@v2
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
|
|
|
@ -4,42 +4,48 @@ on:
|
|||
- master
|
||||
- main
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
|
||||
name: Benchmark
|
||||
jobs:
|
||||
Compare:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21.x
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Benchmark
|
||||
run: set -o pipefail; go test ./... -benchmem -run=^$ -bench . | tee output.txt
|
||||
- name: Get Previous Benchmark Results
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./cache
|
||||
key: ${{ runner.os }}-benchmark
|
||||
- name: Save Benchmark Results
|
||||
uses: benchmark-action/github-action-benchmark@v1.16.2
|
||||
with:
|
||||
tool: 'go'
|
||||
output-file-path: output.txt
|
||||
github-token: ${{ secrets.BENCHMARK_TOKEN }}
|
||||
benchmark-data-dir-path: 'benchmarks'
|
||||
fail-on-alert: true
|
||||
comment-on-alert: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
# Enable Job Summary for PRs - deactivated because of issues
|
||||
#summary-always: ${{ github.event_name != 'push' && github.event_name != 'workflow_dispatch' }}
|
||||
auto-push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
save-data-file: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
# NOTE: Keep this in sync with the version from go.mod
|
||||
go-version: "1.20.x"
|
||||
|
||||
- name: Run Benchmark
|
||||
run: set -o pipefail; go test ./... -benchmem -run=^$ -bench . | tee output.txt
|
||||
|
||||
- name: Get Previous Benchmark Results
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./cache
|
||||
key: ${{ runner.os }}-benchmark
|
||||
|
||||
- name: Save Benchmark Results
|
||||
uses: benchmark-action/github-action-benchmark@v1.16.2
|
||||
with:
|
||||
tool: "go"
|
||||
output-file-path: output.txt
|
||||
github-token: ${{ secrets.BENCHMARK_TOKEN }}
|
||||
benchmark-data-dir-path: "benchmarks"
|
||||
fail-on-alert: true
|
||||
comment-on-alert: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
# Enable Job Summary for PRs - deactivated because of issues
|
||||
#summary-always: ${{ github.event_name != 'push' && github.event_name != 'workflow_dispatch' }}
|
||||
auto-push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
save-data-file: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
|
|
|
@ -6,16 +6,16 @@ on:
|
|||
- master
|
||||
- main
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
schedule:
|
||||
- cron: '0 3 * * 6'
|
||||
- cron: "0 3 * * 6"
|
||||
|
||||
jobs:
|
||||
analyse:
|
||||
|
@ -23,40 +23,40 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
with:
|
||||
languages: go
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
with:
|
||||
languages: go
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
|
|
@ -9,16 +9,19 @@ on:
|
|||
pull_request:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
# NOTE: Keep this in sync with the version from go.mod
|
||||
go-version: 1.21.x
|
||||
go-version: "1.20.x"
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
push:
|
||||
# branches to consider in the event; optional, defaults to all
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
||||
#- name: Set GHE_HOST
|
||||
# run: |
|
||||
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
||||
#- name: Set GHE_HOST
|
||||
# run: |
|
||||
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
||||
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||
# with:
|
||||
# config-name: my-config.yml
|
||||
# disable-autolabeler: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Drafts your next Release notes as Pull Requests are merged into "master"
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
||||
# with:
|
||||
# config-name: my-config.yml
|
||||
# disable-autolabeler: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: 'Sync docs'
|
||||
name: "Sync docs"
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -6,9 +6,9 @@ on:
|
|||
- master
|
||||
- main
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- "docs/**"
|
||||
release:
|
||||
types: [ published ]
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
sync-docs:
|
||||
|
@ -19,13 +19,11 @@ jobs:
|
|||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Install JQ
|
||||
run: sudo apt-get install jq
|
||||
node-version: "18"
|
||||
|
||||
- name: Sync docs
|
||||
run: ./.github/scripts/sync_docs.sh
|
||||
|
|
|
@ -4,14 +4,15 @@ on:
|
|||
- master
|
||||
- main
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
|
||||
name: Test
|
||||
jobs:
|
||||
Build:
|
||||
|
@ -21,15 +22,17 @@ jobs:
|
|||
platform: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Run Test
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
max_attempts: 3
|
||||
timeout_minutes: 15
|
||||
command: go test ./... -v -race -count=1
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run Test
|
||||
uses: nick-fields/retry@v2
|
||||
with:
|
||||
max_attempts: 3
|
||||
timeout_minutes: 15
|
||||
command: go test ./... -v -race -count=1
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
name: Run govulncheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
- '!docs/**'
|
||||
- '!**.md'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
paths:
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**"
|
||||
- "!docs/**"
|
||||
- "!**.md"
|
||||
|
||||
jobs:
|
||||
govulncheck-check:
|
||||
|
@ -21,15 +21,18 @@ jobs:
|
|||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 'stable'
|
||||
check-latest: true
|
||||
cache: false
|
||||
- name: Install Govulncheck
|
||||
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
- name: Run Govulncheck
|
||||
run: govulncheck ./...
|
||||
- name: Fetch Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "stable"
|
||||
check-latest: true
|
||||
cache: false
|
||||
|
||||
- name: Install Govulncheck
|
||||
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
|
||||
- name: Run Govulncheck
|
||||
run: govulncheck ./...
|
||||
|
|
Loading…
Reference in New Issue