Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
]
},
"demaconsulting.reqstream": {
"version": "1.3.0",
"version": "1.4.0",
"commands": [
"reqstream"
]
Expand Down
86 changes: 63 additions & 23 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
--property:Version=${{ inputs.version }}
--collect "XPlat Code Coverage;Format=opencover"
--logger "trx;LogFilePrefix=${{ matrix.os }}"
--results-directory test-results
--results-directory build-artifacts
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated

- name: End Sonar Scanner
env:
Expand All @@ -143,33 +143,44 @@ jobs:
--no-restore
--property:PackageVersion=${{ inputs.version }}

# === CAPTURE TOOL VERSIONS ===
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
# This section captures the versions of all tools used in the build process.
# Downstream projects: Add any additional tools to capture here.

- name: Capture tool versions
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
shell: bash
run: |
echo "Capturing tool versions..."
# Create short job ID: build-win, build-ubuntu
OS_SHORT=$(echo "${{ matrix.os }}" | sed 's/windows-latest/win/;s/ubuntu-latest/ubuntu/')
JOB_ID="build-${OS_SHORT}"
dotnet versionmark --capture --job-id "${JOB_ID}" -- \
mkdir -p build-artifacts
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
dotnet versionmark --capture --job-id "${JOB_ID}" \
--output "build-artifacts/versionmark-${JOB_ID}.json" -- \
dotnet git dotnet-sonarscanner versionmark
echo "✓ Tool versions captured"

Comment thread
Malcolmnixon marked this conversation as resolved.
- name: Upload version capture
uses: actions/upload-artifact@v7
with:
name: version-capture-${{ matrix.os }}
path: versionmark-build-*.json
# === CAPTURE OTS SELF-VALIDATION RESULTS ===
# This section runs the self-validation of each OTS tool and saves TRX results
# so that OTS Software Requirements in requirements.yaml can be satisfied.
# Downstream projects: Add any additional OTS tool self-validation steps here.

- name: Upload Test Results
- name: Run VersionMark self-validation
run: >
dotnet versionmark
--validate
--results build-artifacts/versionmark-self-validation-${{ matrix.os }}.trx

- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}
path: test-results/*.trx
name: artifacts-build-${{ matrix.os }}
path: build-artifacts/
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated

- name: Upload Artifacts
- name: Upload packages
uses: actions/upload-artifact@v7
with:
name: artifacts-${{ matrix.os }}
name: packages-${{ matrix.os }}
path: |
src/TemplateDotNetLibrary/bin/Release/*.nupkg
src/TemplateDotNetLibrary/bin/Release/*.snupkg
Expand Down Expand Up @@ -251,11 +262,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Download all test results
- name: Download all build artifacts
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
uses: actions/download-artifact@v8
with:
path: test-results
pattern: '*test-results*'
path: build-artifacts
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
pattern: 'artifacts-build-*'
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
continue-on-error: true

- name: Download CodeQL SARIF
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
Expand All @@ -264,13 +275,6 @@ jobs:
name: codeql-sarif
path: codeql-results

- name: Download all version captures
uses: actions/download-artifact@v8
with:
path: version-captures
pattern: 'version-capture-*'
continue-on-error: true

# === INSTALL DEPENDENCIES ===
# This section installs all required dependencies and tools for document generation.
# Downstream projects: Add any additional dependency installations here.
Expand Down Expand Up @@ -303,6 +307,41 @@ jobs:
dotnet git node npm pandoc weasyprint sarifmark sonarmark reqstream buildmark versionmark
echo "✓ Tool versions captured"
Comment thread
Malcolmnixon marked this conversation as resolved.

# === CAPTURE OTS SELF-VALIDATION RESULTS ===
# This section runs the self-validation of each OTS tool and saves TRX results
# so that OTS Software Requirements in requirements.yaml can be satisfied.
# Downstream projects: Add any additional OTS tool self-validation steps here.

- name: Run ReqStream self-validation
Comment thread
Malcolmnixon marked this conversation as resolved.
run: >
dotnet reqstream
--validate
--results test-results/reqstream-self-validation.trx
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated

- name: Run BuildMark self-validation
run: >
dotnet buildmark
--validate
--results test-results/buildmark-self-validation.trx

- name: Run VersionMark self-validation
run: >
dotnet versionmark
--validate
--results test-results/versionmark-self-validation.trx

- name: Run SarifMark self-validation
run: >
dotnet sarifmark
--validate
--results test-results/sarifmark-self-validation.trx

- name: Run SonarMark self-validation
run: >
dotnet sonarmark
--validate
--results test-results/sonarmark-self-validation.trx

# === GENERATE MARKDOWN REPORTS ===
# This section generates all markdown reports from various tools and sources.
# Downstream projects: Add any additional markdown report generation steps here.
Expand All @@ -311,6 +350,7 @@ jobs:
run: >
dotnet reqstream
--requirements requirements.yaml
--tests "build-artifacts/**/*.trx"
--tests "test-results/**/*.trx"
--report docs/requirements/requirements.md
--justifications docs/justifications/justifications.md
Expand Down Expand Up @@ -371,7 +411,7 @@ jobs:
run: |
echo "Publishing tool versions..."
dotnet versionmark --publish --report docs/buildnotes/versions.md --report-depth 1 \
-- "versionmark-*.json" "version-captures/**/versionmark-*.json"
-- "versionmark-*.json" "build-artifacts/**/versionmark-*.json"
echo "✓ Tool versions published"

- name: Display Tool Versions Report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Download package artifacts
uses: actions/download-artifact@v8
with:
name: artifacts-ubuntu-latest
name: packages-ubuntu-latest
path: artifacts

- name: Download documents artifact
Expand Down
82 changes: 82 additions & 0 deletions requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,85 @@ sections:
range of .NET projects, including those targeting .NET Framework and older .NET Core versions.
tests:
- "net481@DemoMethod_ReturnsGreeting_WithDefaultPrefix"

- title: OTS Software
requirements:
- id: Template-OTS-MSTest
title: MSTest shall execute unit tests and report results.
justification: |
MSTest (MSTest.TestFramework and MSTest.TestAdapter) is the unit-testing framework used
by the project. It discovers and runs all test methods and writes TRX result files that
feed into coverage reporting and requirements traceability. Passing tests confirm the
framework is functioning correctly.
tags: [ots]
tests:
- DemoMethod_ReturnsGreeting_WithDefaultPrefix
- DemoMethod_ReturnsGreeting_WithCustomPrefix
- DemoMethod_ThrowsArgumentNullException_ForNullInput
- DemoMethod_ThrowsArgumentException_ForEmptyInput
- Constructor_ThrowsArgumentNullException_ForNullPrefix
- Constructor_ThrowsArgumentException_ForEmptyPrefix
- DemoClass_DefaultPrefix_IsHello
- DemoClass_Prefix_ReturnsCustomPrefix
- DemoClass_DefaultConstructor_SetsDefaultPrefix

- id: Template-OTS-ReqStream
title: ReqStream shall enforce that every requirement is linked to passing test evidence.
justification: |
DemaConsulting.ReqStream processes requirements.yaml and the TRX test-result files to
produce a requirements report, justifications document, and traceability matrix. When
run with --enforce, it exits with a non-zero code if any requirement lacks test evidence,
making unproven requirements a build-breaking condition. A successful pipeline run with
--enforce proves all requirements are covered and that ReqStream is functioning.
tags: [ots]
tests:
- ReqStream_EnforcementMode

- id: Template-OTS-BuildMark
title: BuildMark shall generate build-notes documentation from GitHub Actions metadata.
justification: |
DemaConsulting.BuildMark queries the GitHub API to capture workflow run details and
renders them as a markdown build-notes document included in the release artifacts.
It runs as part of the same CI pipeline that produces the TRX test results, so a
successful pipeline run is evidence that BuildMark executed without error.
tags: [ots]
tests:
- BuildMark_MarkdownReportGeneration

- id: Template-OTS-VersionMark
title: VersionMark shall publish captured tool-version information.
justification: |
DemaConsulting.VersionMark reads version metadata for each dotnet tool used in the
pipeline and writes a versions markdown document included in the release artifacts.
It runs in the same CI pipeline that produces the TRX test results, so a successful
pipeline run is evidence that VersionMark executed without error.
tags: [ots]
tests:
- VersionMark_CapturesVersions
- VersionMark_GeneratesMarkdownReport

- id: Template-OTS-SarifMark
title: SarifMark shall convert CodeQL SARIF results into a markdown report.
justification: |
DemaConsulting.SarifMark reads the SARIF output produced by CodeQL code scanning and
renders it as a human-readable markdown document included in the release artifacts.
It runs in the same CI pipeline that produces the TRX test results, so a successful
pipeline run is evidence that SarifMark executed without error.
tags: [ots]
tests:
- SarifMark_SarifReading
- SarifMark_MarkdownReportGeneration

- id: Template-OTS-SonarMark
title: SonarMark shall generate a SonarCloud quality report.
justification: |
DemaConsulting.SonarMark retrieves quality-gate and metrics data from SonarCloud and
renders it as a markdown document included in the release artifacts. It runs in the
same CI pipeline that produces the TRX test results, so a successful pipeline run is
evidence that SonarMark executed without error.
tags: [ots]
tests:
- SonarMark_QualityGateRetrieval
- SonarMark_IssuesRetrieval
- SonarMark_HotSpotsRetrieval
- SonarMark_MarkdownReportGeneration