-
Notifications
You must be signed in to change notification settings - Fork 8
GitHub workflow #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
GitHub workflow #21
Conversation
.github/workflows/publish.yml
Outdated
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheCrossLegCoder please use actions/checkout@v4
.github/workflows/publish.yml
Outdated
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "7.0.x" # Use a single version for publishing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use appropriate dotnet version
.github/workflows/publish.yml
Outdated
- uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use actions/setup-dotnet@v4
.github/workflows/test.yml
Outdated
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use actions/checkout@v4
- uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use actions/setup-dotnet@v4
.github/workflows/test.yml
Outdated
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "7.0.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use appropriate version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces two new GitHub workflows to run tests and publish the NuGet package, as well as updates the README badge to reflect passing tests.
- Added a "Run Tests" workflow to build and test the project on multiple .NET frameworks and configurations.
- Added a "Build and Publish NuGet Package" workflow that builds, packages, and pushes the NuGet package on tag pushes.
- Updated README.md to include a badge indicating that tests are passing.
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
README.md | Added a badge for test status. |
.github/workflows/test.yml | Introduced a test workflow with matrix configurations for Debug/Release builds across multiple frameworks. |
.github/workflows/publish.yml | Introduced a publish workflow to build, pack, and push the NuGet package upon version tag push. |
Files not reviewed (2)
- NepDate.sln: Language not supported
- tatus -s: Language not supported
WalkthroughThis pull request introduces two new GitHub Actions workflows to automate building, testing, and publishing a NuGet package using multiple .NET frameworks. The publish workflow triggers on version tags and publishes the NuGet package for .NET 7.0, while the test workflow runs on pushes and pull requests across different OS and .NET versions. Additionally, two projects have been removed from the solution file, a test status badge has been added to the README, and several source and test files have been deleted, reducing the overall codebase. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User (Push Tag)
participant R as Runner
participant C as Codebase
participant N as NuGet Repo
U->>R: Push tag "v*"
R->>C: Checkout code & set up .NET environment
R->>C: Restore dependencies, Build, Run tests (matrix: .NET 4.7.2, 7.0, 9.0)
R->>R: Extract version from tag
alt Framework is .NET 7.0
R->>N: Publish NuGet package using API key
end
sequenceDiagram
participant U as User (Push/PR)
participant R as Runner
participant C as Codebase
participant T as Test Executor
U->>R: Trigger test workflow on main branch
R->>C: Checkout code & set up .NET (matrix of OS & versions)
R->>C: Restore dependencies
R->>C: Build solution (msbuild/dotnet build based on .NET version)
R->>T: Run tests (msbuild for 4.7.2, dotnet test otherwise)
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Co-authored-by: Copilot <[email protected]>
Summary by CodeRabbit
Chores
Documentation
Bug Fixes