Skip to content

chore(deps): bump actions/setup-go from 3 to 5 #300

chore(deps): bump actions/setup-go from 3 to 5

chore(deps): bump actions/setup-go from 3 to 5 #300

Workflow file for this run

name: commit stage
on:
push:
branches:
- main
pull_request:
jobs:
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.18"
- name: run golangci-lint
uses: golangci/golangci-lint-action@v3
setup:
name: setup
needs: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.18"
- uses: actions/cache@v3
with:
path: |
~/.cache/app/vendor
./vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go mod vendor
build:
name: build
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.18"
- uses: actions/cache@v3
with:
path: |
~/.cache/app/vendor
./vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go vet ./...
test:
name: test
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.18"
- uses: actions/cache@v3
with:
path: |
~/.cache/app/vendor
./vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test -coverprofile=coverage.txt ./...
- uses: actions/upload-artifact@v3
with:
name: test-coverage
path: ./coverage.txt
if-no-files-found: error
coverage:
name: Codecov
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: test-coverage
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
benchmark:
name: benchmark
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.18"
- uses: actions/cache@v3
with:
path: |
~/.cache/app/vendor
./vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test ./tests/benchmark/... -bench=. -benchmem > benchmark_result.txt
- uses: actions/upload-artifact@v3
with:
name: benchmark_result
path: ./benchmark_result.txt
if-no-files-found: error