Files
nuclei/.github/workflows/perf-regression.yaml
Dwi Siswanto 78e90e300d ci: refactor workflows (#6728)
Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-12-25 02:35:44 +07:00

41 lines
1.3 KiB
YAML

name: 🔨 Performance Regression
on:
workflow_call: {}
workflow_dispatch: {}
jobs:
perf-regression:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei'
env:
BENCH_OUT: "/tmp/bench.out"
steps:
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- uses: projectdiscovery/actions/cache/go-rod-browser@v1
- uses: projectdiscovery/actions/cache/nuclei@v1
- run: make build-test
- run: ./bin/nuclei.test -test.run - -test.bench=. -test.benchmem ./cmd/nuclei/ | tee $BENCH_OUT
env:
DISABLE_STDOUT: "1"
- uses: actions/cache/restore@v5
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- uses: benchmark-action/github-action-benchmark@v1
with:
name: 'RunEnumeration Benchmark'
tool: 'go'
output-file-path: ${{ env.BENCH_OUT }}
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: false
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
summary-always: true
- uses: actions/cache/save@v5
if: github.event_name == 'push'
with:
path: ./cache
key: ${{ runner.os }}-benchmark