Skip to content

Commit

Permalink
ci: add .duvet/config.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft committed Jan 22, 2025
1 parent de9e864 commit f7cf6d4
Show file tree
Hide file tree
Showing 59 changed files with 889 additions and 35 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.
5 changes: 1 addition & 4 deletions .github/actions/compliance/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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 f7cf6d4

Please sign in to comment.