feat: add unit tests and GitHub Actions workflow for PR testing - #1031
feat: add unit tests and GitHub Actions workflow for PR testing#1031luboszima wants to merge 2 commits into
Conversation
…tion and github workflow to run tests
|
@hargata can you enable to run Github Actions for this repository automatically without approval? |
There was a problem hiding this comment.
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.
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. |
17919f9 to
55e54b4
Compare
Ok, I understand, then let's keep it as a manual trigger for reviewer. |
|
This would be great addition - echos my sentiments too. great work on the pr @luboszima |
|
@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. |
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.