Skip to content

Commit

Permalink
Merge branch 'main' into now-transport
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert authored Nov 13, 2024
2 parents 3e13e49 + 1cae854 commit 043a559
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/qns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"]
merge_group:
workflow_dispatch:
schedule:
# Run at 1 AM each day, so there is a `main`-branch baseline in the cache.
- cron: '0 1 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
Expand Down Expand Up @@ -164,6 +167,13 @@ jobs:
pattern: '*results'
path: results

- uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: results-main
key: qns-${{ runner.name }}-${{ github.sha }}
restore-keys: qns-${{ runner.name }}-

- run: sudo apt-get install -y --no-install-recommends wdiff
- run: |
mapfile -t LIST < <(echo '${{ needs.implementations.outputs.pairs }}' | jq '.[]' | sort)
for PREFIX in "${LIST[@]}"; do
Expand Down Expand Up @@ -195,8 +205,16 @@ jobs:
for GROUP in $(jq -r < "$RUN/$ROLE.grouped.json" '.results | keys[]'); do
RESULT=$(jq < "$RUN/$ROLE.grouped.json" -r '.results.'"$GROUP"'[]' | fmt -w 1000)
LOG=$(jq -r < "$RUN/$ROLE.grouped.json" -r '.log_url')
BASELINE=$(mktemp)
if [ -e "results-main/${PREFIX} results/$ROLE.grouped.json" ]; then
jq < "results-main/${PREFIX} results/$ROLE.grouped.json" -r '.results.'"$GROUP"'[]' | fmt -w 1000 > "$BASELINE"
else
touch "$BASELINE"
fi
[ -n "$RESULT" ] || continue
echo "* [$PAIR]($LOG): **$RESULT**" >> "$ROLE.$GROUP.md"
DIFF=$(wdiff -n "$BASELINE" - <<< "$RESULT" || true)
RESULT=$(echo "$DIFF" | sed -E "s/\[-|-\]/~~/g; s/\{\+|\+\}/\*\*/g")
echo "* [$PAIR]($LOG): $RESULT" >> "$ROLE.$GROUP.md"
done
done
done
Expand Down Expand Up @@ -234,6 +252,12 @@ jobs:
echo "</details>"
} >> comment.md
- if: github.ref == 'refs/heads/main'
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: results
key: qns-${{ runner.name }}-${{ github.sha }}

- uses: ./.github/actions/pr-comment-data-export
with:
name: ${{ github.workflow }}
Expand Down

0 comments on commit 043a559

Please sign in to comment.