Skip to content

Commit 71304fe

Browse files
committed
chore(duvet): modernize duvet
1 parent 322493b commit 71304fe

5 files changed

Lines changed: 77 additions & 12 deletions

File tree

.duvet/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
reports/
2+
requirements/
3+
specification/

.duvet/config.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'$schema' = "https://awslabs.github.io/duvet/config/v0.4.0.json"
2+
3+
[[source]]
4+
pattern = "src/**/*.java"
5+
6+
# Include required specifications here
7+
[[specification]]
8+
source = "specification/s3-encryption/client.md"
9+
[[specification]]
10+
source = "specification/s3-encryption/materials/keyrings.md"
11+
[[specification]]
12+
source = "specification/s3-encryption/materials/s3-keyring.md"
13+
[[specification]]
14+
source = "specification/s3-encryption/materials/s3-kms-keyring.md"
15+
16+
[report.html]
17+
enabled = true
18+
19+
# Enable snapshots to prevent requirement coverage regressions
20+
[report.snapshot]
21+
enabled = false

.github/workflows/duvet.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: duvet
2+
3+
on:
4+
workflow_call:
5+
# Optional inputs that can be provided when calling this workflow
6+
7+
jobs:
8+
test:
9+
runs-on: macos-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
pages: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v5
18+
with:
19+
submodules: true
20+
21+
- name: Setup Rust toolchain
22+
uses: actions-rust-lang/setup-rust-toolchain@v1
23+
with:
24+
toolchain: stable
25+
26+
- name: Clone duvet repository
27+
run: git clone https://github.com/awslabs/duvet.git /tmp/duvet
28+
29+
- name: Build and install duvet
30+
run: |
31+
cd /tmp/duvet
32+
cargo xtask build
33+
cargo install --path ./duvet
34+
35+
- name: Run duvet
36+
run: make duvet
37+
38+
- name: Upload duvet reports
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: reports
42+
include-hidden-files: true
43+
path: .duvet/reports/report.html
44+

Makefile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Used for misc supporting functions like Duvet and prettier. Builds, tests, etc. should use the usual Java/Maven tooling.
22

3-
duvet: | duvet_extract duvet_report
4-
5-
duvet_extract:
6-
rm -rf compliance
7-
$(foreach file, $(shell find specification/s3-encryption -name '*.md'), duvet extract -o compliance -f MARKDOWN $(file);)
3+
duvet: | duvet_clean duvet_report
84

95
duvet_report:
10-
duvet \
11-
report \
12-
--spec-pattern "compliance/**/*.toml" \
13-
--source-pattern "src/**/*.java" \
14-
--source-pattern "compliance_exceptions/*.txt" \
15-
--html specification_compliance_report.html
6+
duvet report
7+
8+
duvet-view-report-mac:
9+
open .duvet/reports/report.html
10+
11+
duvet_clean:
12+
rm -rf .duvet/reports/ .duvet/requirements/

specification

0 commit comments

Comments
 (0)