Skip to content

chore(deps): update codecov/codecov-action action to v4 #17

chore(deps): update codecov/codecov-action action to v4

chore(deps): update codecov/codecov-action action to v4 #17

Workflow file for this run

name: check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: ["push"]
jobs:
check:
strategy:
matrix:
os: [ ubuntu-20.04, macos-latest ]
go: [ '1.21' ]
name: Check ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: make init
- run: make check test-options="-race --coverprofile=coverage.coverprofile --covermode=atomic"
- name: Upload coverage to Codecov
if: success() && matrix.go == '1.21' && matrix.os == 'ubuntu-20.04'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.coverprofile
fail_ci_if_error: false
benchmark:
needs: check
strategy:
matrix:
os: [ ubuntu-20.04 ]
go: [ '1.21' ]
name: Benchmark comparison ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checkout Code (Previous)
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: previous
- name: Checkout Code (New)
uses: actions/checkout@v4
with:
path: new
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install Dependencies
run: go install golang.org/x/perf/cmd/benchstat@latest
- name: Init (Previous)
run: |
cd previous
make init
- name: Run Benchmark (Previous)
run: |
cd previous
go test -run="-" -bench=".*" -count=7 ./... | tee benchmark.txt
- name: Init (New)
run: |
cd new
make init
- name: Run Benchmark (New)
run: |
cd new
go test -run="-" -bench=".*" -count=7 ./... | tee benchmark.txt
- name: Run Benchstat
run: benchstat previous/benchmark.txt new/benchmark.txt