From ea4d522ec33faea6670bbf4c45750ffc0cbf1060 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Tue, 16 Dec 2025 16:48:37 +0000 Subject: [PATCH 1/2] chore(ci): remove dev branch jobs and add static.sh Remove bench-dev and test-dev jobs from daily workflow since the dev branch no longer exists. Add ci/static.sh script to generate coverage badge for GitHub Pages. Refs #539 --- .github/workflows/daily.yml | 30 ------------------------------ ci/static.sh | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 30 deletions(-) create mode 100755 ci/static.sh diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 62e3d337..01c08f72 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -34,33 +34,3 @@ jobs: with: name: coverage.html path: ./ci/out/coverage.html - bench-dev: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: dev - - uses: actions/setup-go@v5 - with: - go-version-file: ./go.mod - - run: AUTOBAHN=1 make bench - test-dev: - runs-on: ubuntu-latest - steps: - - name: Disable AppArmor - if: runner.os == 'Linux' - run: | - # Disable AppArmor for Ubuntu 23.10+. - # https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md - echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns - - uses: actions/checkout@v4 - with: - ref: dev - - uses: actions/setup-go@v5 - with: - go-version-file: ./go.mod - - run: AUTOBAHN=1 make test - - uses: actions/upload-artifact@v4 - with: - name: coverage-dev.html - path: ./ci/out/coverage.html diff --git a/ci/static.sh b/ci/static.sh new file mode 100755 index 00000000..68d4b6e7 --- /dev/null +++ b/ci/static.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eu + +cd -- "$(dirname "$0")/.." + +if [[ ! -f ./ci/out/profile.txt ]]; then + echo "No coverage profile found, run 'make test' first" + exit 1 +fi + +if [[ ! -f ./ci/out/coverage.html ]]; then + echo "No coverage report found, run 'make test' first" + exit 1 +fi + +rm -rf ./ci/out/static +mkdir -p ./ci/out/static +cp ./ci/out/coverage.html ./ci/out/static/coverage.html +percent=$(go tool cover -func ./ci/out/profile.txt | tail -n1 | awk '{print $3}' | tr -d '%') +wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${percent}%25-success" From e7e5f43e8ddde98db38e809f3959f946a7c0dd85 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 23 Oct 2026 14:39:12 +0000 Subject: [PATCH 2/2] chore(ci): remove static.sh Nothing calls ci/static.sh, and it reads ci/out/profile.txt, which ci/test.sh does not write (it writes ci/out/coverage.prof). The script only works with the ci/test.sh changes in #539, so it moves back there and this PR only drops the dev branch jobs. --- ci/static.sh | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 ci/static.sh diff --git a/ci/static.sh b/ci/static.sh deleted file mode 100755 index 68d4b6e7..00000000 --- a/ci/static.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -eu - -cd -- "$(dirname "$0")/.." - -if [[ ! -f ./ci/out/profile.txt ]]; then - echo "No coverage profile found, run 'make test' first" - exit 1 -fi - -if [[ ! -f ./ci/out/coverage.html ]]; then - echo "No coverage report found, run 'make test' first" - exit 1 -fi - -rm -rf ./ci/out/static -mkdir -p ./ci/out/static -cp ./ci/out/coverage.html ./ci/out/static/coverage.html -percent=$(go tool cover -func ./ci/out/profile.txt | tail -n1 | awk '{print $3}' | tr -d '%') -wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${percent}%25-success"