AppUnitTest is a sample Swift project designed to demonstrate unit testing in iOS development. The project includes configurations for GitHub Actions to automate builds and tests, ensuring robust and reliable code.
- Unit Testing: Comprehensive unit tests to ensure code reliability.
- CI/CD Integration: GitHub Actions workflow for automated builds and tests.
- Modern Swift Practices: Leverages Swift and XCTest for a seamless developer experience.
AppUnitTest
: The main Xcode project directory.Tests
: Contains unit test cases for various components of the project..github/workflows
: CI workflow files for automating builds and tests.
The project is configured with a GitHub Actions workflow that:
-
Triggers:
- On
push
to themain
branch. - On
pull_request
to themain
branch.
- On
-
Steps:
- Checks out the code.
- Builds the project using
xcodebuild
. - Runs unit tests on an iOS Simulator.
- Xcode 15.0.1 or higher
- macOS 14.7.2 or higher
- iOS Simulator (e.g., iPhone 14)
- Clone the repository:
git clone https://github.com/ANSCoder/AppUnitTest.git cd AppUnitTest
- Open the project in Xcode:
open AppUnitTest.xcodeproj
- Run the unit tests:
- Select the
AppUnitTest
scheme. - Press
Cmd+U
to execute the tests.
- Select the
The workflow automatically:
- Builds the project.
- Runs unit tests using GitHub Actions.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your feature"
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is open source and available under the MIT License.
Thanks to all contributors and the iOS developer community for their support and inspiration.
Feel free to customize it further to fit your project details! 🚀