diff --git a/.github/workflows/test_and_lint.yml b/.github/workflows/test_and_lint.yml index f24447ba..1ff693fe 100644 --- a/.github/workflows/test_and_lint.yml +++ b/.github/workflows/test_and_lint.yml @@ -17,7 +17,20 @@ jobs: - run: go mod tidy - run: go get - run: go generate ./... - - run: go test -v -race -cover ./... + - run: go test -v -cover ./... + + # https://blog.jetbrains.com/go/2019/04/03/profiling-go-applications-and-tests/ + - run: go test -v -bench=^BenchmarkInBoundsChannels$ -cpuprofile=cpu.out -memprofile mem.out ./... + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: cpu-profile + path: ./cpu.out + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: mem-profile + path: ./mem.out lint: runs-on: ubuntu-latest