-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f61ea25
commit 7022840
Showing
1 changed file
with
62 additions
and
0 deletions.
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,62 @@ | ||
name: patrol prepare | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
prepare-ios: | ||
runs-on: ${{ matrix.os }} | ||
name: iOS on ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest] | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install tools | ||
run: | | ||
brew update | ||
brew install swift-format | ||
brew install clang-format | ||
brew install xcbeautify | ||
- name: swift-format lint | ||
run: test -z $(swift-format lint --recursive --strict .) | ||
|
||
- name: swift-format format | ||
if: success() || failure() | ||
run: | | ||
swift-format format --recursive --in-place . | ||
git update-index --refresh | ||
git diff-index --quiet HEAD -- | ||
- name: clang-format | ||
if: success() || failure() | ||
run: | | ||
find . -iname '*.h' -o -iname '*.m' \ | ||
| xargs -I {} clang-format --dry-run --Werror {} | ||
- name: Start iOS simulator | ||
uses: futureware-tech/simulator-action@v2 | ||
with: | ||
model: iPhone 14 | ||
os: iOS | ||
os_version: 16.2 | ||
erase_before_boot: true | ||
shutdown_after_job: true | ||
|
||
- name: Run UI tests | ||
run: | | ||
set -o pipefail | ||
xcodebuild test \ | ||
-workspace Landmarks.xcworkspace \ | ||
-scheme Landmarks \ | ||
-only-testing LandmarksUITests \ | ||
-configuration Debug \ | ||
-sdk iphoneos -destination 'platform=iOS Simulator,name=iPhone 14' \ | ||
| xcbeautify --renderer github-actions |