Repository navigation
Move CI to GitHub Actions; retire AppVeyor and Azure Pipelines config - #4105
Merged
Merged
Conversation
- Set core.autocrlf before checkout (was after, so it had no effect) - Use actions/setup-dotnet with global-json-file instead of init.ps1 (init.ps1 -> Set-EnvVars.ps1 uses the removed ::set-env/::add-path commands) - Use NuGet 6.0.6 and sequential msbuild, matching Azure Pipelines - Produce StyleCop.Analyzers.Status.json like AppVeyor - Upload nupkg, status report, and binlog on failure - Add test matrix C# 6-13 x Debug/Release mirroring build/test.yml (xunit.console.x86 under OpenCover) - Add coverage merge job mirroring the Azure 'Publish Code Coverage' stage (without the codecov.io upload)
StyleCop.Analyzers.Status.Generator fails on windows-latest (VS 2022) with a ReflectionTypeLoadException while creating MSBuildWorkspace. That's a tooling issue unrelated to the build or tests, so don't let it block the test matrix or other artifacts.
Matches build/test.yml, and keeps partial coverage from crashed runs out of the merged report.
AArnott
marked this pull request as draft
October 5, 2026 23:44
OpenCover 4.6.519 intermittently crashes the test process in Debug jobs (seen on C# 7, 10, 11, 12 Debug here; C# 13 Debug on Azure). Mirror #4104: wrap xunit.console.x86 with coverlet.console 6.0.4, Cobertura output, keeping the OpenCover.Reports / OpenCover.*.xml names for the merge step.
'nuget install' rejects coverlet.console because it is a DotnetTool package (NU5000), but packages.config restore accepts it. Use the identical .nuget/packages.config from #4104 (OpenCover -> coverlet.console 6.0.4) so the two PRs merge cleanly.
- Delete azure-pipelines.yml and its templates build/build-and-test.yml and build/test.yml (nothing else references them), plus their solution items. - Replace appveyor.yml with a stub that disables AppVeyor builds. The AppVeyor project builds from its UI settings when appveyor.yml is missing (skipBranchesWithoutAppveyorYml=false), so deleting the file would not stop it.
AArnott
marked this pull request as ready for review
October 6, 2026 01:08
This was referenced Oct 7, 2026
AArnott
added a commit
that referenced
this pull request
Oct 7, 2026
Merge Edwin Engelen's original commits from #4077 (b0af9b7, 0d3e41c, e65f52d, 9b946ab) on top of the C# 14 test project from #4117. Conflict resolution: - b0af9b7 is Edwin's copy of Björn's "Add test project for c# 14" (ccb81f4, already in history). Keep the #4117 version of the C# 14 test project (csproj and SA1107 tests); its Azure Pipelines edits are dropped because master deleted build/build-and-test.yml and build/test.yml (#4105). - SA1500CSharp14UnitTests.cs, SA1513CSharp14UnitTests.cs: take Edwin's tests on top of the empty C# 14 test classes. - The NuGet.Frameworks 6.3.3 -> 6.3.4 bump (0d3e41c) merges cleanly and is kept: it is a patch-level bump of a test-only dependency.
alexander-efremov
pushed a commit
to alexander-efremov/StyleCopNext.Analyzers
that referenced
this pull request
Oct 7, 2026
Bring Björn's C# 14 test project commit (ccb81f4, from DotNetAnalyzers#4040) up to date with master. Conflict resolution: - build/build-and-test.yml, build/test.yml: keep master's deletion (DotNetAnalyzers#4105 moved CI to GitHub Actions); the C# 14 test stage moves to .github/workflows/build.yml (test binary upload + langVersion 14 matrix entry). - SA1107UnitTests.cs: keep the GetFixedCodeTestEmptyStatementAfterBlock hook from DotNetAnalyzers#4040 on top of master's VerifyCSharpFixAsync form of the test.
This was referenced Oct 7, 2026
AArnott
added a commit
that referenced
this pull request
Oct 7, 2026
Codecov was last updated by Azure Pipelines (bc487e7, Oct 6). Since #4105 moved CI to GitHub Actions without the codecov.io upload step, nothing has been uploaded. Upload the merged Cobertura report from the coverage job with codecov/codecov-action (pinned to v7.1.1), when every test job succeeded. It authenticates with GitHub OIDC, so no Codecov token secret is needed; pull requests from forks fall back to Codecov's tokenless upload.
This was referenced Oct 8, 2026
This was referenced Nov 11, 2026
Bump StyleCop.Analyzers from 1.2.0-beta.556 to 1.3.180
microsoftgraph/aspnetcore-webhooks-sample#436
Open
This was referenced Nov 23, 2026
Open
[DPDBT] Bump Microsoft.CodeAnalysis.Analyzers and 6 others
sergey-rybalkin/CommandLine.Generators#63
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes GitHub Actions the CI for this repo and retires the AppVeyor and Azure Pipelines config.
Maintainer action is needed before this can merge. See Required before merge.
Changes
.github/workflows/build.yml.nuget/packages.configcoverlet.console6.0.4. Byte-identical to #4104, so the two PRs don't conflict on this file.azure-pipelines.yml,build/build-and-test.yml,build/test.ymlStyleCopAnalyzers.slnbuild/*.ymlfiles.appveyor.ymlbuild/opencover-report.ps1is kept because it's a local developer script, not CI config. README, docs,version.json/NBGV, and the Unstable package ID are unchanged.The workflow
It starts from the
Buildworkflow in #3956 (AArnott:modernize, closed, never merged): onewindows-latestjob (Debug/Release) runninginit.ps1,nuget restore, andmsbuild, then uploading the Release.nupkg. It had no tests. The first commit brings that file in unchanged. Changes since then:core.autocrlf trueis set before checkout. It used to run after checkout, so it had no effect. This matches AppVeyor.actions/setup-dotnetwithglobal-json-file: global.json(6.0.100) instead ofinit.ps1.init.ps1goes throughSet-EnvVars.ps1, which uses the removed::set-env/::add-pathcommands.msbuild(AnnotatorBuildTask doesn't support parallel builds), as the old Azure build did. A binlog is uploaded on failure.xunit.console.x86wrapped by coverlet.console, with Cobertura output. This is the same invocation as ci: replace OpenCover with coverlet.console (fix C#13 Debug AV crash) #4104. TFMs are net452 (C# 6), net46 (C# 7), and net472 (C# 8–13). Test binaries are passed from the build job as artifacts.master(tags ignored), plusworkflow_dispatch. Superseded PR runs are cancelled. Token permissions arecontents: read.Why coverlet instead of OpenCover
With OpenCover 4.6.519, Debug test jobs crashed intermittently on Actions, the same way Azure's "Test C# 13 Debug" did. About 15 s after "Starting", xunit died with no output, OpenCover committed a near-empty report, and the job exited 1. It hit C# 7, 9, 10, 11 and 12 Debug on different runs. One C# 13 Release job also hung for more than 18 minutes. After switching to coverlet (as #4104 does for Azure), all 16 jobs pass. For example, C# 13 Debug ran 8,739 tests with 0 failures and 91% line coverage. No tests were skipped or changed.
Artifacts
nuget-packages:StyleCop.Analyzers.<ver>.nupkg,StyleCop.Analyzers.Unstable.<ver>.nupkg, and.symbols.nupkgtest-results-cs<N>-<Config>: xUnit XMLcoverage-cs<N>andcoverage-mergedtest-bin-cs<N>-<Config>: internal handoff between jobs, 3-day retentionstatus-json: only when the status generator succeeds (it currently doesn't; see Known issues)No
.vsix: the VSIX project was removed in 473a022 (Dec 2023), so there's no VSIX to publish. AppVeyor's.vsixartifact path already matched nothing.Why
appveyor.ymlis a stub instead of deletedThe AppVeyor project's public API (
ci.appveyor.com/api/projects/sharwell/stylecopanalyzers) reportsskipBranchesWithoutAppveyorYml: false. That means ifappveyor.ymlis missing, AppVeyor falls back to the build settings in its web UI and keeps building. So the stub stops webhook builds using AppVeyor's documented settings:skip_commits: message: /.*/(docs)branches: only: [__appveyor_disabled__](docs)skip_tags: truebuild: off/test: off, in case a build is started from the UI, API, or a schedule (those ignore the filters)Verified on this PR: AppVeyor built
c81c5963(branch and PR builds) but created no build forc56bb282, the commit that adds the stub.Azure Pipelines after deleting the YAML
Azure definition 6 (
DotNetAnalyzers.StyleCopAnalyzers, dev.azure.com/DotNetAnalyzers) did not queue a failing build forc56bb282. It queued nothing at all, and Azure reports no check on that commit. Deleting the YAML therefore stops it on this branch rather than turning it red. The definition is still enabled, though. Any branch or old PR that still containsazure-pipelines.ymlwill keep triggering it until someone disables the definition.Required before merge (maintainer actions)
master: the required status checks are currentlycontinuous-integration/appveyor/prandDotNetAnalyzers.StyleCopAnalyzers. Neither will report on this PR or later ones, so the PR stays blocked. A repo admin needs to replace them with the Actions checks (for example theTest C# * *andBuild *jobs).appveyor.ymlstub can be deleted. Old branches without the stub (e.g.stabilization, which still has the oldappveyor.yml) will keep building on AppVeyor until then.docs/index.htmlloadsStyleCop.Analyzers.Status.jsonfrom AppVeyor'smasterartifacts. With AppVeyor disabled that data will stop updating, and the README badge still points at AppVeyor. Both need a follow-up docs change (out of scope here).Known issues
StyleCop.Analyzers.Status.Generatorfails onwindows-latest(VS 2022/2026 image) with aReflectionTypeLoadExceptioninMSBuildWorkspace.Create(). AppVeyor ran it on its VS 2019 image. It's a tooling problem, so the step iscontinue-on-errorandstatus-jsonisn't produced for now.build/test.yml, which this PR deletes. Whichever merges second will hit a modify/delete conflict; resolve it by keeping the deletion..nuget/packages.configis identical in both PRs.