Skip to content

feat: add GitHub Actions CI/CD workflows and local test runner#7

Merged
gragra33 merged 7 commits into
masterfrom
develop
Apr 19, 2026
Merged

feat: add GitHub Actions CI/CD workflows and local test runner#7
gragra33 merged 7 commits into
masterfrom
develop

Conversation

@gragra33
Copy link
Copy Markdown
Owner

Summary

Merges develop into master — brings in the GitHub Actions CI/CD pipeline introduced in PR #6.

Changes

CI workflow (.github/workflows/ci.yml)

  • Triggers on push to develop, feature/**, fix/**, hotfix/** and PRs targeting develop / master
  • validate-branch job (PR-only): enforces feature/, fix/, hotfix/, or develop naming conventions
  • build-and-test job: builds and runs the full test suite on net10.0; uploads .trx test results as artifacts (gated via RUNNING_LOCALLY env var so local act runs skip the upload)

Release workflow (.github/workflows/release.yml)

  • Triggers on push to master
  • Builds, tests, extracts version from .csproj, guards against re-releasing an existing tag, packs, creates a GitHub Release, and pushes to NuGet.org

Local test runner (ci-cd-test-run.ps1)

  • -Mode lint|dry|ci|all, -Workflow ci|release|both, -Job (CI only) parameters
  • Uses actionlint for YAML validation and act for local workflow simulation
  • Accurately described as approximating (not mirroring) GitHub Actions; -Job is CI-workflow-only guarded

Test isolation fixes

  • Added [Collection("SpanPropertyAccessorCache")] to SpanPropertyAccessorTests and PropertyAccessorCachingTests
  • Added CollectionDefinitions.cs with [CollectionDefinition("SpanPropertyAccessorCache", DisableParallelization = true)] — prevents any other test collection from running concurrently and corrupting the shared static SpanPropertyAccessor cache

Test Results

All 487 tests pass.

- ci.yml: triggers on push to develop/feature/fix/hotfix branches and PRs
  to develop/master; validates branch naming on PRs; builds and tests on
  net10.0; uploads test results (.trx) as artifacts
- release.yml: triggers on push to master; build, test, extract version,
  guard against re-releasing, pack, GitHub Release, push to NuGet.org
- ci-cd-test-run.ps1: local runner with lint/dry/ci/all modes and
  ci/release/both workflow selection; uses RUNNING_LOCALLY env var gate
  to skip upload-artifact when running under act
- release.yml: remove unused RUNNING_LOCALLY env block (no upload-artifact
  step in release workflow, so the variable was declared but never referenced)
- release.yml: add --no-restore to dotnet pack (Restore step already ran;
  omitting it caused an implicit redundant restore)
- ci-cd-test-run.ps1: update description wording — act uses push event so
  PR-only jobs (validate-branch) are not exercised locally; wording now
  accurately says 'approximates' rather than 'mirrors exactly'
- ci-cd-test-run.ps1: guard -Job parameter to CI workflow only; if -Job is
  supplied with -Workflow release or both, emit a clear warning and skip the
  -j flag for the Release workflow to avoid act erroring on an unknown job name
feat: add GitHub Actions CI/CD workflows and local test runner
Copilot AI review requested due to automatic review settings April 19, 2026 12:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Brings CI/CD automation into the repo by adding GitHub Actions workflows for CI and releases, plus a local PowerShell runner to lint/simulate workflows via actionlint + act. It also addresses flaky tests caused by shared static caching by isolating affected tests into a non-parallelized xUnit collection.

Changes:

  • Add CI workflow to build/test on net10.0 and (when not running under act) upload .trx test results.
  • Add release workflow to build/test, derive package version from .csproj, create a GitHub Release, and push packages to NuGet.
  • Add local CI/CD runner script and adjust xUnit test parallelization for cache-sensitive tests.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Adds CI build/test pipeline with branch-name validation and gated artifact upload.
.github/workflows/release.yml Adds automated build/test/pack/release/NuGet publish on pushes to master.
ci-cd-test-run.ps1 Provides local workflow linting and act-based simulation/execution.
tests/Blazing.Json.Queryable.Tests/CollectionDefinitions.cs Defines a non-parallelized xUnit collection for cache-sensitive tests.
tests/Blazing.Json.Queryable.Tests/UnitTests/Evaluators/SpanPropertyAccessorTests.cs Assigns tests to the cache-isolation collection.
tests/Blazing.Json.Queryable.Tests/UnitTests/Performance/PropertyAccessorCachingTests.cs Assigns tests to the cache-isolation collection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml
Comment thread tests/Blazing.Json.Queryable.Tests/CollectionDefinitions.cs Outdated
gragra33 added a commit that referenced this pull request Apr 19, 2026
- release.yml: add concurrency group to prevent race conditions when
  multiple pushes to master happen close together; cancel-in-progress
  is false so a running release is never aborted mid-way
- release.yml: add explicit 'Fail if this version was already released'
  step after tag_check so a duplicate-version push to master fails
  loudly with ::error:: rather than silently succeeding with no publish
- CollectionDefinitions.cs: fix XML doc cref targets — qualify
  DisableParallelization as Xunit.CollectionDefinitionAttribute.DisableParallelization
  and remove the space in ConcurrentDictionary{TKey,TValue} to avoid
  CS1574 warnings when doc generation is enabled
- release.yml: add concurrency group to prevent race conditions when
  multiple pushes to master happen close together; cancel-in-progress
  is false so a running release is never aborted mid-way
- release.yml: add explicit 'Fail if this version was already released'
  step after tag_check so a duplicate-version push to master fails
  loudly with ::error:: rather than silently succeeding with no publish
- CollectionDefinitions.cs: fix XML doc cref targets — qualify
  DisableParallelization as Xunit.CollectionDefinitionAttribute.DisableParallelization
  and remove the space in ConcurrentDictionary{TKey,TValue} to avoid
  CS1574 warnings when doc generation is enabled
fix: address Copilot PR #7 review feedback
@gragra33 gragra33 merged commit 7fab07c into master Apr 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants