Skip to content

ci(workflows): add PR-tests workflow running dotnet test - #69

Merged
kirill-abblix merged 1 commit into
masterfrom
feature/add-pr-test-workflow
Apr 29, 2026
Merged

ci(workflows): add PR-tests workflow running dotnet test#69
kirill-abblix merged 1 commit into
masterfrom
feature/add-pr-test-workflow

Conversation

@kirill-abblix

Copy link
Copy Markdown
Member

Summary

Closes a real CI gap — Oidc.Server has only CodeQL static-analysis on PRs; tests have never run in CI. Reviewers had no GitHub-visible proof tests pass.

Workflow mirrors Abblix/Kezio/.github/workflows/pr-tests.yml and Abblix/AuthenticationService/.github/workflows/pr-validation.yml:

  • All uses: pinned to commit SHAs with version comments (per github-actions-security-checklist § Action pinning).
  • Top-level permissions: contents: read; persist-credentials: false on checkout to drop the GITHUB_TOKEN git credential after fetch.
  • concurrency: cancel-in-progress: true — fresh push aborts stale runs.
  • timeout-minutes: 20 — bounded runtime.
  • Installs SDK 8/9/10 (library projects multi-target); tests execute on net10.
  • MTP-native test invocation (xunit.v3 + Microsoft.Testing.Platform) — VSTest flags would be silently ignored.

actionlint clean.

Test plan

  • actionlint .github/workflows/pr-tests.yml — no issues.
  • Workflow run on this PR itself (GitHub picks it up from head ref when workflow file is added in PR).

Closes a real CI gap — no test runner on master / develop PRs until now,
only CodeQL static analysis. SonarCloud's signal does not include test
execution. Reviewers had no GitHub-visible proof that tests pass.

Workflow mirrors the existing patterns in Abblix/Kezio (pr-tests.yml) and
Abblix/AuthenticationService (pr-validation.yml):

- All actions pinned to commit SHAs with version comments per
  Docs/wiki/github-actions-security-checklist.md § Action pinning.
- Top-level permissions: contents: read; persist-credentials: false on
  checkout to drop the GITHUB_TOKEN credential after fetch.
- concurrency cancel-in-progress so a fresh push aborts stale runs.
- timeout-minutes: 20 to bound runaway builds.
- Three SDKs installed (8/9/10) for the cross-target library projects;
  tests themselves run on net10.
- MTP-native test invocation (xunit.v3 + Microsoft.Testing.Platform);
  VSTest flags would be silently ignored.
@sonarqubecloud

Copy link
Copy Markdown

@kirill-abblix
kirill-abblix merged commit 0a70377 into master Apr 29, 2026
4 checks passed
@kirill-abblix
kirill-abblix deleted the feature/add-pr-test-workflow branch April 29, 2026 08:50
@kirill-abblix

Copy link
Copy Markdown
Member Author

Post-merge note (2026-04-29): rolled back from master.

This PR was created against master by mistake — it should have targeted develop. After merge I caught the Git Flow violation and reset master to the pre-session tip (71dd981) via git push --force-with-lease.

Unlike #68, the content of this PR is not preserved on develop: develop already had its own pr-tests.yml (added in commit 34a5e37 long before this PR) running dotnet test on every PR, and the subsequent master → develop merge resolved that conflict in favour of develop's pre-existing version. So my version of pr-tests.yml was a duplicate effort I didn't notice — its loss costs nothing because develop's variant already does the same job.

Net state:

  • master tip: 71dd981 — no pr-tests.yml (file never existed on master before today).
  • develop tip: e7b9d65 — runs pr-tests.yml from 34a5e37, which already covers the validation this PR aimed to add.
  • This PR remains MERGED in GitHub metadata because the API blocks changing base of a closed PR; the comment is the only way to annotate the audit trail.

Lesson: should have grepped the develop branch for an existing PR-tests workflow before authoring a new one. Codified the feature → develop base-branch rule in this repo's CLAUDE.md and in cross-repo memory (feedback-default-base-branch-develop.md).

kirill-abblix added a commit that referenced this pull request Jul 4, 2026
…69)

Closes a real CI gap — no test runner on master / develop PRs until now,
only CodeQL static analysis. SonarCloud's signal does not include test
execution. Reviewers had no GitHub-visible proof that tests pass.

Workflow mirrors the existing patterns in Abblix/Kezio (pr-tests.yml) and
Abblix/AuthenticationService (pr-validation.yml):

- All actions pinned to commit SHAs with version comments per
  Docs/wiki/github-actions-security-checklist.md § Action pinning.
- Top-level permissions: contents: read; persist-credentials: false on
  checkout to drop the GITHUB_TOKEN credential after fetch.
- concurrency cancel-in-progress so a fresh push aborts stale runs.
- timeout-minutes: 20 to bound runaway builds.
- Three SDKs installed (8/9/10) for the cross-target library projects;
  tests themselves run on net10.
- MTP-native test invocation (xunit.v3 + Microsoft.Testing.Platform);
  VSTest flags would be silently ignored.
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.

1 participant