-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
GitHub Actions for Running Unit Tests #123
Merged
mikaelacaron
merged 4 commits into
mikaelacaron:dev
from
hanhqvu:53-github-action-unit-test
Oct 11, 2023
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-13 | ||
|
||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare xcconfig | ||
run: cp Basic-Car-Maintenance.xcconfig.template Basic-Car-Maintenance.xcconfig | ||
|
||
- name: Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
|
||
- name: Run Unit Tests | ||
run: bundle exec fastlane unit_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "fastlane" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app | ||
# apple_id("[[APPLE_ID]]") # Your Apple Developer Portal username | ||
mikaelacaron marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
# For more information about the Appfile, see: | ||
# https://docs.fastlane.tools/advanced/#appfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This file contains the fastlane.tools configuration | ||
# You can find the documentation at https://docs.fastlane.tools | ||
# | ||
# For a list of all available actions, check out | ||
# | ||
# https://docs.fastlane.tools/actions | ||
# | ||
# For a list of all available plugins, check out | ||
# | ||
# https://docs.fastlane.tools/plugins/available-plugins | ||
# | ||
|
||
# Uncomment the line if you want fastlane to automatically update itself | ||
# update_fastlane | ||
|
||
default_platform(:ios) | ||
|
||
platform :ios do | ||
desc "Description of what the lane does" | ||
lane :custom_lane do | ||
# add actions here: https://docs.fastlane.tools/actions | ||
end | ||
end | ||
|
||
lane :unit_tests do | ||
run_tests(build_for_testing: true, | ||
scheme: "Basic-Car-Maintenance", | ||
only_testing: "Basic-Car-Maintenance-Tests", | ||
device: "iPhone 15 Pro") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
fastlane documentation | ||
---- | ||
|
||
# Installation | ||
|
||
Make sure you have the latest version of the Xcode command line tools installed: | ||
|
||
```sh | ||
xcode-select --install | ||
``` | ||
|
||
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) | ||
|
||
# Available Actions | ||
|
||
### unit_tests | ||
|
||
```sh | ||
[bundle exec] fastlane unit_tests | ||
``` | ||
|
||
|
||
|
||
---- | ||
|
||
|
||
## iOS | ||
|
||
### ios custom_lane | ||
|
||
```sh | ||
[bundle exec] fastlane ios custom_lane | ||
``` | ||
|
||
Description of what the lane does | ||
|
||
---- | ||
|
||
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. | ||
|
||
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). | ||
|
||
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we run on 13 or later?
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.
Yeah, I think that's possible
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.
It seems there are less runners for macOS 14 so Github Actions will wait for until 1 is available.
This might take up to 10 minutes so I think macOS 13 would be fine for now.