Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add .duvet/config.toml
Browse files Browse the repository at this point in the history
camshaft committed Jan 22, 2025

Verified

This commit was signed with the committer’s verified signature.
dwilkie David Wilkie
1 parent de9e864 commit 2514186
Showing 59 changed files with 891 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .duvet/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
reports/
# extract requirements on demand
requirements/
16 changes: 16 additions & 0 deletions .duvet/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'$schema' = "https://awslabs.github.io/duvet/config/v0.4.0.json"

[[source]]
pattern = "h3/**/*.rs"

[[specification]]
source = "https://www.rfc-editor.org/rfc/rfc9114"

[report.html]
enabled = true
issue-link = "https://github.com/hyperium/h3/issues"
blob-link = "https://github.com/hyperium/h3/blob/${{ SHA || GITHUB_SHA || 'master' }}"

# Enable snapshots to prevent requirement coverage regressions
[report.snapshot]
enabled = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
867 changes: 867 additions & 0 deletions .duvet/snapshot.txt

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 3 additions & 6 deletions .github/actions/compliance/action.yml
Original file line number Diff line number Diff line change
@@ -2,9 +2,6 @@ name: 'Spec compliance report'
description: 'Generate compliance report and publish on Github pages'

inputs:
extract-script:
description: 'Path to script that extracts compliance requirements'
required: true
report-script:
description: 'Path to script that generates a compliance report'
required: true
@@ -43,9 +40,9 @@ runs:
git config --local user.email "github-actions[bot]@users.noreply.github.com"
if git ls-remote --exit-code --heads origin gh-pages; then
cp -r .github ci h3 target
cp -r .duvet .github ci h3 target
git switch gh-pages
cp -r target/.github target/ci target/h3 .
cp -r target/.duvet target/.github target/ci target/h3 .
else
git checkout --orphan gh-pages
git reset
@@ -55,14 +52,14 @@ runs:
working-directory: ${{ inputs.h3-dir }}
shell: bash
run: |
${{ inputs.extract-script }}
${{ inputs.report-script }}
# commit only when there are changes
- name: Commit report changes
working-directory: ${{ inputs.h3-dir }}
shell: bash
run: |
cp .duvet/reports/* ci/compliance/
git add ci/compliance/*.html
git diff --staged --quiet || \
git commit -m "${{ github.triggering_actor }}-${SHA}-${{ github.job }}#${{ github.run_number }}"
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -185,5 +185,4 @@ jobs:
- name: Generate compliance report
uses: ./.github/actions/compliance
with:
extract-script: ${{ github.workspace }}/ci/compliance/extract.sh
report-script: ${{ github.workspace }}/ci/compliance/report.sh
18 changes: 0 additions & 18 deletions ci/compliance/extract.sh

This file was deleted.

14 changes: 2 additions & 12 deletions ci/compliance/report.sh
Original file line number Diff line number Diff line change
@@ -2,16 +2,6 @@

set -e

duvet report \
--spec-pattern 'specs/**/*.toml' \
--spec-pattern 'ci/compliance/specs/**/*.toml' \
--source-pattern 'h3/**/*.rs' \
--workspace \
--exclude duvet \
--require-tests false \
--blob-link "https://github.com/hyperium/h3/blob/master" \
--issue-link 'https://github.com/hyperium/h3/issues' \
--no-cargo \
--html ci/compliance/report.html
duvet report

echo "compliance report available in 'ci/compliance/report.html'"
echo "compliance report available in '.duvet/reports/report.html'"

0 comments on commit 2514186

Please sign in to comment.