Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/updates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Update Stats

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
go-version: "1.25"

- name: Fetch workflow data
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
run: |
gh api repos/urunc-dev/urunc/actions/workflows \
--paginate > workflows_raw.json

echo "{}" > runs_raw.json

jq -r '.workflows[] | "\(.id) \(.name)"' workflows_raw.json | while read wf_id wf_name; do
echo "Processing workflow: $wf_name (ID: $wf_id)"

gh api "repos/urunc-dev/urunc/actions/workflows/${wf_id}/runs?per_page=20" \
> runs_tmp.json

jq --arg id "$wf_id" \
--arg name "$wf_name" \
--slurpfile runs runs_tmp.json \
'. + {($id): ($runs[0] + {name: $name})}' \
runs_raw.json > tmp.json

mv tmp.json runs_raw.json
done
echo "===== FINAL workflows_raw.json ====="
cat workflows_raw.json

echo "===== FINAL runs_raw.json ====="
cat runs_raw.json

rm -f runs_tmp.json

- name: Generate stats
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: go run .

- name: Cleanup temp files
run: rm -f workflows_raw.json runs_raw.json tmp.json

- name: Commit changes if needed
run: |
if git diff --quiet stats.json; then
echo "No changes"
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git add -A
git commit -m "update stats"
git push
168 changes: 168 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
settings:
source_repo: "urunc-dev/urunc"
refresh_interval: 60
max_runs_per_workflow: 20

log_analysis:
max_signals_per_job: 40

# Lines containing these patterns are ignored before analysis.
noise_patterns:
- "sudo process started"
- "/usr/lib/gcc/"
- "/usr/bin/gcc"
- "gcc_fatalf.c"
- "-werror"
- "/opt/hostedtoolcache/"
- "arguments: ["
- "cc1,"
- "gmt:sudo process started"

# Lower priority number = more important
categories:
- name: "Crash / Timeout"
priority: 1
patterns:
- "panic:"
- "test timed out"
- "all goroutines are asleep"
- "deadlock"
- "segmentation violation"

- name: "Network Failure"
priority: 2
patterns:
- "connection reset by peer"
- "i/o timeout"
- "tls handshake timeout"
- "no route to host"
- "temporary failure in name resolution"
- "context deadline exceeded"

- name: "Test Failure"
priority: 3
patterns:
- "fail\t"
- "--- fail:"
- "failing specs"
- "expected"
- "received"

- name: "Build Failure"
priority: 4
patterns:
- "make: ***"
- "exit status"
- "process completed with exit code"
- "##[error]"
- "compilation terminated"

- name: "Fatal Runtime Error"
priority: 5
patterns:
- "level=fatal"
- "fatal msg="
- "failed to copy"
- "fatal: "

workflows:
- name: "add-git-trailers"
description: "Git trailer validation"
critical: false

- name: "build"
description: "Build workflow"
critical: true

- name: "build-latest"
description: "Build latest version"
critical: true

- name: "build-trigger"
description: "Trigger build pipeline"
critical: false

- name: "ci"
description: "Main CI workflow"
critical: true

# old and noisy
# - name: "ci_devel"
# description: "Development CI"
# critical: false

- name: "ci_main"
description: "Main branch CI"
critical: true

- name: "ci_nightly"
description: "Nightly builds"
critical: false

- name: "ci_on_push"
description: "CI on push"
critical: true

- name: "codeql"
description: "Security analysis"
critical: true

- name: "dependency-review"
description: "Dependency checks"
critical: false

# - name: "kind_test"
# description: "Kubernetes tests"
# critical: true

# - name: "lint"
# description: "Lint checks"
# critical: true

- name: "pr-merge"
description: "PR merge checks"
critical: true

- name: "pr-takeover"
description: "PR takeover automation"
critical: false

- name: "pr-trailers"
description: "PR trailer validation"
critical: false

- name: "publish_docs"
description: "Documentation publishing"
critical: false

- name: "release-trigger"
description: "Release pipeline"
critical: true

- name: "scorecard"
description: "Security scorecard"
critical: false

- name: "stale"
description: "Stale issue cleanup"
critical: false

- name: "unit_test"
description: "Unit tests"
critical: true

- name: "upload_s3"
description: "Upload artifacts to S3"
critical: false

- name: "urunc-deploy-test"
description: "Deployment test"
critical: true

- name: "validate-files-and-commits"
description: "Validation checks"
critical: true

- name: "vm_test"
description: "VM tests"
critical: true
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/urunc-dev/ci-dashboard

go 1.25.3

require go.yaml.in/yaml/v3 v3.0.4
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Loading