Skip to content

ci: auto-discover root *.slnx in CI workflows#411

Merged
mpaulosky merged 1 commit into
devfrom
squad/410-ci-autodiscover-slnx
Jun 3, 2026
Merged

ci: auto-discover root *.slnx in CI workflows#411
mpaulosky merged 1 commit into
devfrom
squad/410-ci-autodiscover-slnx

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Closes #410

Changes

Replace hardcoded \MyBlog.slnx\ in both CI workflows with a discovery step that interrogates the repo at runtime.

squad-ci.yml / squad-test.yml

  • Added Discover solution file step using \ ind -maxdepth 1 -name '*.slnx'\
  • Exports discovered path as \SOLUTION_FILE\ via \\
  • Fails fast with a clear error if zero or multiple .slnx\ files are found at the root
  • Restore and build steps now reference \\ instead of the hardcoded name

Both workflows are now drop-in reusable across any repo with a single root-level .slnx\ file.

Replace hardcoded MyBlog.slnx with a discovery step that finds exactly
one root-level *.slnx file, exports it as SOLUTION_FILE via GITHUB_ENV,
and uses that variable for restore/build. Fails with a clear error if
zero or multiple solution files are found at the repo root.
Copilot AI review requested due to automatic review settings June 3, 2026 21:22
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI workflows to avoid hardcoding MyBlog.slnx by discovering the single root-level *.slnx at runtime and using it for restore/build commands.

Changes:

  • Added a “Discover solution file” step (finds exactly one root *.slnx, fails if zero/multiple, exports SOLUTION_FILE).
  • Updated restore/build steps in both workflows to use "$SOLUTION_FILE" instead of a hardcoded solution name.
  • squad-ci.yml also narrows the branch filters for pull_request/push triggers (not mentioned in the PR description/issue).

Reviewed changes

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

File Description
.github/workflows/squad-test.yml Adds solution discovery in the build job and uses the discovered solution for restore/build.
.github/workflows/squad-ci.yml Adds solution discovery and switches restore/build to the discovered solution; also changes workflow trigger branch filters.

Comment on lines 4 to +9
on:
pull_request:
branches: [dev, preview, main, insider]
branches: [dev, main]
types: [opened, synchronize, reopened]
push:
branches: [dev, insider]
branches: [dev]
Comment on lines 2 to +6
# Runs on PR to main branch — mirrors pre-push gate (build only, no tests)

on:
pull_request:
branches: [dev, preview, main, insider]
branches: [dev, main]
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Test Results Summary

557 tests  ±0   557 ✅ ±0   39s ⏱️ -2s
  6 suites ±0     0 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit dbf8c16. ± Comparison against base commit bf40f7d.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.49%. Comparing base (bf40f7d) to head (dbf8c16).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #411   +/-   ##
=======================================
  Coverage   87.49%   87.49%           
=======================================
  Files          71       71           
  Lines        1775     1775           
  Branches      214      214           
=======================================
  Hits         1553     1553           
  Misses        145      145           
  Partials       77       77           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mpaulosky mpaulosky merged commit bcd1aae into dev Jun 3, 2026
21 checks passed
@mpaulosky mpaulosky deleted the squad/410-ci-autodiscover-slnx branch June 3, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: auto-discover root *.slnx in CI workflows

2 participants