Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 49 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI

on: [push, pull_request]
on:
push:
pull_request:
schedule:
- cron: "0 12 * * 1" # Mondays at 12:00 UTC

permissions: {}

Expand All @@ -19,9 +23,9 @@ jobs:
xcode-version: "15.4"
destination: "platform=iOS Simulator,name=iPhone 15,OS=17.5"
- runner-image: "macos-15"
ios-version: "18.6"
ios-version: "18.5"
xcode-version: "16.4"
destination: "platform=iOS Simulator,name=iPhone 16,OS=18.6"
destination: "platform=iOS Simulator,name=iPhone 16,OS=18.5"
- runner-image: "macos-26"
ios-version: "26.1"
xcode-version: "26.3"
Expand All @@ -40,11 +44,26 @@ jobs:

- name: Run Tests
run: |
xcodebuild test \
-scheme MinFraudDevice \
-destination "${{ matrix.destination }}" \
-resultBundlePath TestResults-iOS${{ matrix.ios-version }}.xcresult \
| xcpretty && exit ${PIPESTATUS[0]}
attempts=3
status=1
for attempt in $(seq 1 $attempts); do
echo "::group::Test attempt $attempt of $attempts"
rm -rf TestResults-iOS${{ matrix.ios-version }}.xcresult
set +e
xcodebuild test \
-scheme MinFraudDevice \
-destination "${{ matrix.destination }}" \
-resultBundlePath TestResults-iOS${{ matrix.ios-version }}.xcresult \
| xcpretty
status=${PIPESTATUS[0]}
set -e
echo "::endgroup::"
if [ $status -eq 0 ]; then
exit 0
fi
echo "Test attempt $attempt failed with exit code $status"
done
exit $status

- name: Upload Test Results
if: always()
Expand All @@ -68,9 +87,9 @@ jobs:
xcode-version: "15.4"
destination: "platform=iOS Simulator,name=iPhone 15,OS=17.5"
- runner-image: "macos-15"
ios-version: "18.6"
ios-version: "18.5"
xcode-version: "16.4"
destination: "platform=iOS Simulator,name=iPhone 16,OS=18.6"
destination: "platform=iOS Simulator,name=iPhone 16,OS=18.5"
- runner-image: "macos-26"
ios-version: "26.1"
xcode-version: "26.3"
Expand All @@ -89,11 +108,26 @@ jobs:

- name: Build Example App
run: |
xcodebuild build \
-project Example/MinFraudDeviceExample/MinFraudDeviceExample.xcodeproj \
-scheme MinFraudDeviceExample \
-destination "${{ matrix.destination }}" \
| xcpretty && exit ${PIPESTATUS[0]}
attempts=3
status=1
for attempt in $(seq 1 $attempts); do
echo "::group::Test attempt $attempt of $attempts"
rm -rf TestResults-iOS${{ matrix.ios-version }}.xcresult
set +e
xcodebuild build \
-project Example/MinFraudDeviceExample/MinFraudDeviceExample.xcodeproj \
-scheme MinFraudDeviceExample \
-destination "${{ matrix.destination }}" \
| xcpretty && exit ${PIPESTATUS[0]}
status=${PIPESTATUS[0]}
set -e
echo "::endgroup::"
if [ $status -eq 0 ]; then
exit 0
fi
echo "Test attempt $attempt failed with exit code $status"
done
exit $status

lint:
name: SwiftLint
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ xcodebuild build -scheme MinFraudDevice -destination 'generic/platform=iOS Simul
### Testing

```bash
xcodebuild test -scheme MinFraudDevice -destination 'platform=iOS Simulator,name=iPhone 16'
xcodebuild test -scheme MinFraudDevice -destination 'platform=iOS Simulator,name=iPhone 17'
```

### Code Quality
Expand Down Expand Up @@ -175,7 +175,7 @@ Build it with:
xcodebuild build \
-project Example/MinFraudDeviceExample/MinFraudDeviceExample.xcodeproj \
-scheme MinFraudDeviceExample \
-destination 'platform=iOS Simulator,name=iPhone 16'
-destination 'platform=iOS Simulator,name=iPhone 17'
Comment thread
PatrickCroninMM marked this conversation as resolved.
```

## Contributing
Expand Down
Loading