Skip to content

Commit

Permalink
exclude macros from iOS testing
Browse files Browse the repository at this point in the history
  • Loading branch information
watt committed Jun 19, 2024
1 parent 2d6af7e commit 03573f8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
-destination "$IOS_DESTINATION" \
build test | bundle exec xcpretty
xcodegen:
xcodegen-apps:
runs-on: macos-latest

steps:
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Generate Xcode project
run: xcodegen generate

- name: ObservableScreen - iOS
- name: ObservableScreen
run: |
xcodebuild \
-project Workflow.xcodeproj \
Expand All @@ -76,16 +76,7 @@ jobs:
-skipMacroValidation \
build
- name: ObservableScreen - macOS
run: |
xcodebuild \
-project Workflow.xcodeproj \
-scheme "ObservableScreen" \
-destination "platform=macOS" \
-skipMacroValidation \
build
spm:
package-tests:
runs-on: macos-latest

steps:
Expand All @@ -94,15 +85,24 @@ jobs:
- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app

- name: Swift Package Manager - iOS
- name: Install XcodeGen
run: brew install xcodegen

- name: Generate Xcode project
run: xcodegen generate

# Macros are only built for the compiler platform, so we cannot run macro tests on iOS. Instead
# we target the "Tests" scheme from project.yml which selectively includes all the other tests.
- name: Tests - iOS
run: |
xcodebuild \
-scheme "Workflow-Package" \
-scheme "Tests" \
-destination "$IOS_DESTINATION" \
-skipMacroValidation \
test
- name: Swift Package Manager - macOS
# On macOS we can run all tests, including macro tests.
- name: Tests - macOS
run: |
xcodebuild \
-scheme "Workflow-Package" \
Expand Down
22 changes: 22 additions & 0 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ targets:
UILaunchScreen:
UIColorName: ""

# This is a scheme for all tests except for macros.
Tests:
platform: iOS
type: bundle.unit-test
info:
path: TestingSupport/AppHost/App/Info.plist
scheme:
testTargets:
- package: Workflow/WorkflowCombineTestingTests
- package: Workflow/WorkflowCombineTests
- package: Workflow/WorkflowConcurrencyTestingTests
- package: Workflow/WorkflowConcurrencyTests
- package: Workflow/WorkflowReactiveSwiftTestingTests
- package: Workflow/WorkflowReactiveSwiftTests
- package: Workflow/WorkflowRxSwiftTestingTests
- package: Workflow/WorkflowRxSwiftTests
- package: Workflow/WorkflowSwiftUIExperimentalTests
- package: Workflow/WorkflowSwiftUITests
- package: Workflow/WorkflowTestingTests
- package: Workflow/WorkflowTests
- package: Workflow/WorkflowUITests

# to add app-hosted test targets:

# ViewEnvironmentUI-Tests:
Expand Down

0 comments on commit 03573f8

Please sign in to comment.