Skip to content

Initial version of the app#1

Merged
JoeProgrammer88 merged 11 commits intomainfrom
InitialVersion
Mar 31, 2026
Merged

Initial version of the app#1
JoeProgrammer88 merged 11 commits intomainfrom
InitialVersion

Conversation

@JoeProgrammer88
Copy link
Copy Markdown
Member

Copilot Summary

This pull request introduces a comprehensive test suite for the application's models and converters, and adds a GitHub Actions workflow for automated build and test on pull requests. The changes significantly improve code quality by ensuring core logic is tested and by automating CI for Windows/.NET 10 MAUI projects.

The most important changes are:

Automated Build and Test Workflow:

  • Added a GitHub Actions workflow (.github/workflows/build-and-test.yml) to automatically build the solution, install dependencies, run all tests, and upload test results on pull requests targeting the main branch. This ensures continuous integration and early detection of issues.

Test Project Setup:

  • Introduced a new test project (SarahsDailyApp.Tests/SarahsDailyApp.Tests.csproj) with references to required libraries (xUnit, coverlet, sqlite-net-pcl, MAUI controls) and the main application project, enabling robust unit testing for MAUI components.

Model Unit Tests:

  • Added detailed unit tests for core models:
    • TaskItem, Habit, FinanceItem, and various other models (e.g., Project, WishItem, Note, ShoppingItem, etc.), verifying default values, property behaviors, and uniqueness of IDs. [1] [2] [3] [4]

Converter Unit Tests:

  • Added comprehensive tests for value converters (InverseBoolConverter, BoolToStrikethroughConverter, PercentToProgressConverter, etc.), ensuring correct conversion logic and handling of edge cases.

Test Database Utility:

  • Implemented a TestDatabaseService helper to provide a disposable, isolated SQLite database for tests, preventing interference with production data and supporting reliable integration tests.

Replaced MAUI-specific workload install step with a general workload restore using dotnet workload restore SarahsDailyApp.sln. This ensures all workloads specified in the solution are restored, improving compatibility and maintainability.
Switched workflow steps to target SarahsDailyApp.csproj for restore and build, specifying MAUI target frameworks and runtime identifiers. Adjusted test step to ensure tests run after building the project by removing the --no-build flag.
TargetFrameworks is now passed with URL-encoded semicolons (%3B)
and quoted in dotnet restore/build commands to prevent issues
with YAML or shell parsing of semicolons.
Refactored build-and-test.yml to restore and build Android and Windows targets individually for the .NET MAUI project. Added explicit steps for each platform with correct target frameworks and runtime parameters to improve clarity and reliability of the CI process.
The <UseMaui>true</UseMaui> property was deleted from SarahsDailyApp.Tests.csproj, so the test project is no longer explicitly configured as a .NET MAUI project. This may affect how the tests are built and run, especially if MAUI-specific features were previously required.
Removed Microsoft.Maui.Controls and Microsoft.Maui.Controls.Compatibility package references from SarahsDailyApp.Tests.csproj to clean up unnecessary dependencies. All other package references remain unchanged.
Added Microsoft.Maui.Resizetizer (v10.0.51) to SarahsDailyApp.Tests.csproj with build and buildTransitive assets excluded to avoid unnecessary build-time dependencies.
@JoeProgrammer88 JoeProgrammer88 merged commit b19051f into main Mar 31, 2026
1 check passed
@JoeProgrammer88 JoeProgrammer88 deleted the InitialVersion branch March 31, 2026 21:04
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