-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
changelog:noneNo consumer observable changes (no SemVer increment)No consumer observable changes (no SemVer increment)scope:repoGitHub repository and/or ActionsGitHub repository and/or Actionstype:cdChanges to our CD configuration files and scriptsChanges to our CD configuration files and scriptstype:ciChanges to our CI configuration files and scriptsChanges to our CI configuration files and scripts
Milestone
Description
I imagine the CI and CD workflows to be a combination of previous projects, but all in GitHub Actions (no Azure DevOps):
- https://github.com/Flash0ver/F0.CodeAnalysis.Benchmarking/tree/main/.github/workflows
- https://github.com/Flash0ver/F0.Analyzers/tree/main/azure/pipelines
Workflows
- CI workflow
- on push to
main
and Pull Requests - Job "Restore & Build & Test" (individually, as most important job to diagnose potential issues quicker)
- matrix all 3 OS
- optional: matrix
Debug
andRelease
configuration - Step: Restore
- explicitly use root
nuget.config
- no caching
- explicitly use root
- Step: Build (no restore)
- Step: Test (no build)
- fail workflow if any test fails
- in any case, still complete the other OS/Configuration test run
- if failed, do not run run code coverage nor mutation testing
- Job: "Collect Code Coverage"
- package
coverlet.collector
already added for both test projects - on Linux only
- Step: restore .NET local tools
- specify
NuGet.config
anddotnet-tools.json
manifest explicitly - no caching
- specify
- Step: Collect Code Coverage
- Format: Cobertura
- create and use
.runsettings
- to specify
<Format>cobertura</Format>
explicitly - to allow suppressing/excluding namespaces and files in the future
- to specify
- produce assets in
./artifacts/code-coverage
- Step: Generate Report
- via
dotnet-reportgenerator-globaltool
, install as local .NET tool - merge all Cobertura results via a wildcard pattern
- Generate HTML
- produce assets in
./artifacts/code-coverage
- via
- Step: Publish HTML Report Artifact
- package
- Job: Mutation Testing
- via
dotnet-stryker
, install as local .NET tool - on Linux only
- Step: restore .NET local tools
- specify
NuGet.config
anddotnet-tools.json
manifest explicitly - no caching
- specify
- Step: run mutation testing and generate HTML report
- create and use
stryker-config.json
for future configuration - produce assets in
./artifacts/mutation-testing
- create and use
- Step: publish HTML Report Artifact
- via
- on push to
- CD workflow
- on push to
publish
- on Linux only
- Step: Run Tests (no coverage, no mutation testing, use implicit restore and build, Release-Configuration only)
- fail pipeline if any test fails
- Step: Pack
dotnet pack
produces "Release" assets per default since .NET 8.0 ... but we could still explicitly set it- create NuGet package in
./artifacts/package
- Step: Publish
- NuGet Secret Name:
NUGET_API_KEY
- NuGet Secret Name:
- on push to
- both
- mind the new
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
output paths- create output HTML artifacts within
./artifacts
- create output HTML artifacts within
- set available "no-telemetry", "no-logo" and "no-first-time-experience" environment variables for the jobs
- set
--nologo
option per .NET SDK command, if available - use specific OS label, that is equivalent to the current
...-latest
(reproducible builds) - checkout depth: 1 (history is currently not required)
- use SDK from
global.json
explicitly (reproducible builds, should an SDK be dropped from a runner, and also currently the .NET 8.0 SDK is not yet pre-installed in the GitHub-hosted runners) - use latest GitHub Actions currently available as stable release
- consider pinning actions to the commit SHA of the release tag (and add actual version comment)
- arguments passed to CLI arguments and options should be environment variables
- mind the new
Additional Workflows / Jobs
- Scan for packages that have known vulnerabilities
dotnet list package --vulnerable --include-transitive
- See https://devblogs.microsoft.com/nuget/how-to-scan-nuget-packages-for-security-vulnerabilities/
- Triggered by PR, manually, and schedule automatically
Metadata
Metadata
Assignees
Labels
changelog:noneNo consumer observable changes (no SemVer increment)No consumer observable changes (no SemVer increment)scope:repoGitHub repository and/or ActionsGitHub repository and/or Actionstype:cdChanges to our CD configuration files and scriptsChanges to our CD configuration files and scriptstype:ciChanges to our CI configuration files and scriptsChanges to our CI configuration files and scripts