Skip to content

chore(actions)(deps): bump the actions group across 1 directory with 9 updates #7

chore(actions)(deps): bump the actions group across 1 directory with 9 updates

chore(actions)(deps): bump the actions group across 1 directory with 9 updates #7

Workflow file for this run

name: perf-gate
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
bench:
name: scanner self-check
runs-on: ubuntu-latest
env:
CGO_ENABLED: "0"
MAX_SCAN_SECONDS: "10"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: '1.26.2'
cache: true
- name: Build code-signal
run: go build -trimpath -o /tmp/scanner ./cmd/scanner
- name: Run scanner self-check
run: |
set -euo pipefail
START=$(date +%s)
/tmp/scanner scan . --json > /tmp/code-signal-scan.json
END=$(date +%s)
ELAPSED=$((END - START))
test -s /tmp/code-signal-scan.json
grep -q '"score"' /tmp/code-signal-scan.json
{
echo "## code-signal self-check"
echo ""
echo "| metric | value | budget |"
echo "|---|---:|---:|"
echo "| scan wall-clock (s) | ${ELAPSED} | <= ${MAX_SCAN_SECONDS} |"
} >> "$GITHUB_STEP_SUMMARY"
if [ "$ELAPSED" -gt "$MAX_SCAN_SECONDS" ]; then
echo "::error::scan wall-clock ${ELAPSED}s exceeds budget ${MAX_SCAN_SECONDS}s"
exit 1
fi