Skip to content

feat: add unit tests and GitHub Actions workflow for PR testing - #1031

Open
luboszima wants to merge 2 commits into
hargata:mainfrom
luboszima:feat/add-tests
Open

feat: add unit tests and GitHub Actions workflow for PR testing#1031
luboszima wants to merge 2 commits into
hargata:mainfrom
luboszima:feat/add-tests

Conversation

@luboszima

Copy link
Copy Markdown

I recently started using Lubelog and have been impressed with the project. I noticed a few areas for improvement and would love to contribute to the development of this service.

As a first step, I thought it would be valuable to add some basic unit tests to establish a foundation before submitting additional PRs. This should help ensure code quality and make future contributions more reliable.

Copilot AI review requested due to automatic review settings August 20, 2025 06:40

This comment was marked as outdated.

@luboszima

Copy link
Copy Markdown
Author

@hargata can you enable to run Github Actions for this repository automatically without approval?

@luboszima
luboszima requested a review from Copilot August 20, 2025 06:53

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

This PR establishes a foundation for testing in the CarCareTracker application by adding comprehensive unit tests and GitHub Actions CI workflow for automated testing on PRs.

  • Adds unit tests for core business logic classes (UserLogic, VehicleLogic, OdometerLogic, LoginLogic) with comprehensive coverage
  • Creates a new test project with proper dependencies and project structure
  • Implements GitHub Actions workflow to run tests automatically on pushes and pull requests

Reviewed Changes

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

Show a summary per file
File Description
Tests/README.md Documentation for test structure, dependencies, and usage patterns
Tests/Logic/*.cs Unit test files covering business logic classes with mocking
Tests/CarCareTracker.Tests.csproj Test project configuration with necessary dependencies
CarCareTracker.sln Solution file updated to include test project
CarCareTracker.csproj Main project configuration excluding test files from build
.github/workflows/test.yml GitHub Actions workflow for automated testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread Tests/Logic/OdometerLogicTests.cs
Comment thread Tests/Logic/OdometerLogicTests.cs Outdated
@jbcpollak

Copy link
Copy Markdown

@hargata can you enable to run Github Actions for this repository automatically without approval?

I love the idea of this PR and more testing but I wanted to chime in and say I don't think this is a decision to take lightly. In itself it isn't a security risk but it opens the door to a lot potential future problems, for example accidentally using a malicious or compromised Action in a workflow, etc.

@luboszima

Copy link
Copy Markdown
Author

@hargata can you enable to run Github Actions for this repository automatically without approval?

I love the idea of this PR and more testing but I wanted to chime in and say I don't think this is a decision to take lightly. In itself it isn't a security risk but it opens the door to a lot potential future problems, for example accidentally using a malicious or compromised Action in a workflow, etc.

Ok, I understand, then let's keep it as a manual trigger for reviewer.

@iamdabe

iamdabe commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

This would be great addition - echos my sentiments too. great work on the pr @luboszima

@luboszima

Copy link
Copy Markdown
Author

@iamdabe Thank you! I hope with more features people will update Tests too 🙏🏻

@jbcpollak I started working on other PRs. This feature branch is the "base" for another PR: #1034

So if someone checks #1034 first, don't be scared by the amount of changes. After this PR #1031 with unit tests is merged, the other PR will shrink in the number of real changes.

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.

4 participants