Skip to content

docs: prepare v0.0.1 changelog #10

docs: prepare v0.0.1 changelog

docs: prepare v0.0.1 changelog #10

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.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