Skip to content

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

Merged
gragra33 merged 2 commits into
developfrom
feature/github-actions
Apr 19, 2026
Merged

feat: add GitHub Actions CI/CD workflows and local test runner#11
gragra33 merged 2 commits into
developfrom
feature/github-actions

Conversation

@gragra33
Copy link
Copy Markdown
Owner

Summary

Adds full GitHub Actions CI/CD automation for the Utf8JsonAsyncStreamReader project.

Changes

.github/workflows/ci.yml

  • Triggers on push to feature/**, fix/**, hotfix/** and PRs to develop / master
  • validate-branch job: enforces feature/, fix/, or hotfix/ prefix on PR source branches
  • build-and-test job: matrix across net8.0, net9.0, net10.0 with all three SDKs installed
  • Uploads .trx test result artefacts (with continue-on-error: true for known act local limitation)

.github/workflows/release.yml

  • Triggers on push to master
  • Builds and tests all three target frameworks
  • Extracts version from System.Text.Json.Stream.csproj
  • Guards against re-releasing an already-tagged version
  • Packs Utf8JsonAsyncStreamReader.nupkg + .snupkg (symbols enabled)
  • Creates a GitHub Release via gh CLI with both artefacts attached
  • Pushes .nupkg and .snupkg to NuGet.org via ${{ secrets.NUGET_API_KEY }}

src/System.Text.Json.Stream.CI.slnf

  • Solution filter scoping CI to library + tests only
  • Excludes System.Text.Json.Stream.Benchmarks and System.Text.Json.Stream.Benchmarks.Old

ci-cd-test-run.ps1

  • Local runner: lint (actionlint), dry (act -n), ci (full act), all modes
  • Supports -Workflow ci|release|both and -Job <name> targeting
  • Handles known act Windows artifact-cache cleanup false-positive

Pre-merge validation

  • ✅ Build: passed (Release configuration)
  • ✅ Tests: 43/43 passed on net8.0, net9.0, net10.0
  • ✅ Pack: Utf8JsonAsyncStreamReader.2.1.0.nupkg + .snupkg produced
  • ✅ Dry-run CI workflow: passed
  • ✅ Dry-run Release workflow: passed
  • ✅ actionlint: zero violations

Required setup (one-time, before first release)

Add NUGET_API_KEY as a repository secret:
Repository → Settings → Secrets and variables → Actions → New repository secret

- ci.yml: build & test matrix across net8.0, net9.0, net10.0 on push/PR
- release.yml: build, test, pack, tag-guard, GitHub Release, NuGet push
- System.Text.Json.Stream.CI.slnf: solution filter (library + tests only, excludes benchmarks)
- ci-cd-test-run.ps1: local runner with lint, dry-run, and full act execution modes
Copilot AI review requested due to automatic review settings April 19, 2026 07:05
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

Adds CI and release automation for the Utf8JsonAsyncStreamReader repo via GitHub Actions, plus a local PowerShell runner to lint/dry-run/execute workflows using actionlint + act.

Changes:

  • Introduces CI workflow with PR branch-name validation and a test matrix across net8.0/net9.0/net10.0.
  • Introduces release workflow that builds/tests, packs, creates a GitHub Release, and pushes packages to NuGet.
  • Adds a CI-focused solution filter and a local CI/CD runner script.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/System.Text.Json.Stream.CI.slnf Adds a solution filter to scope CI builds/tests to the library + tests.
ci-cd-test-run.ps1 Adds a local runner for actionlint + act modes (lint/dry/ci/all) with some output parsing.
.github/workflows/ci.yml Adds CI workflow with branch validation and a TFM matrix test run plus artifact upload.
.github/workflows/release.yml Adds release workflow for master pushes to publish NuGet packages and create GitHub releases.

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

Comment thread ci-cd-test-run.ps1 Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/release.yml Outdated
Comment thread ci-cd-test-run.ps1 Outdated
- ci.yml: add --no-build --no-restore to dotnet test step
- ci.yml: clarify continue-on-error intent with comment (env.ACT approach rejected — trips actionlint)
- release.yml: add --no-build --no-restore to all three dotnet test steps
- ci-cd-test-run.ps1: downgrade dotnet host check to warning (act installs .NET in runner)
- ci-cd-test-run.ps1: add Test-Tool 'docker' check before docker info for clearer error on missing vs. stopped Docker
@gragra33 gragra33 merged commit f3aae5b into develop Apr 19, 2026
9 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