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
11 changes: 9 additions & 2 deletions .github/actions/uitests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,34 @@ outputs:
runs:
using: composite
steps:
- name: Install xcbeautify
shell: bash
run: brew install xcbeautify

- name: Record baseline images with SwiftUI
shell: bash
run: |
cd Example
set -o pipefail
xcodebuild test \
-scheme SUI_UITests \
-destination "${{ inputs.destination }}" \
-skipMacroValidation \
-skipPackagePluginValidation || true
-skipPackagePluginValidation \
| xcbeautify --renderer github-actions || true

- name: Run UI tests with OpenSwiftUI
id: uitest
continue-on-error: true
shell: bash
run: |
cd Example
set -o pipefail
xcodebuild test \
-scheme OSUI_UITests \
-destination "${{ inputs.destination }}" \
-skipMacroValidation \
-skipPackagePluginValidation 2>&1 | tee /tmp/${{ inputs.platform }}-uitest.log
-skipPackagePluginValidation 2>&1 | tee /tmp/${{ inputs.platform }}-uitest.log | xcbeautify --renderer github-actions

- name: Collect failed snapshots
if: steps.uitest.outcome == 'failure'
Expand Down
40 changes: 26 additions & 14 deletions .github/workflows/compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@ jobs:
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Install xcbeautify
run: brew install xcbeautify
- name: Run compatibility tests on OpenSwiftUI + macOS
run: |
set -o pipefail
swift test \
--filter OpenSwiftUICompatibilityTests \
--build-path .build-compatibility-test-debug
--build-path .build-compatibility-test-debug \
2>&1 | xcbeautify --renderer github-actions
env:
OPENSWIFTUI_COMPATIBILITY_TEST: 0
- name: Run compatibility tests on SwiftUI + macOS
run: |
set -o pipefail
swift test \
--filter OpenSwiftUICompatibilityTests \
--build-path .build-compatibility-test-debug
--build-path .build-compatibility-test-debug \
2>&1 | xcbeautify --renderer github-actions
env:
OPENSWIFTUI_COMPATIBILITY_TEST: 1
compatibility_tests_ios:
Expand Down Expand Up @@ -80,25 +86,31 @@ jobs:
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Install xcbeautify
run: brew install xcbeautify
- name: Run compatibility tests on OpenSwiftUI + iOS
run: |
set -o pipefail
xcodebuild test \
-scheme OpenSwiftUI \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-only-testing:OpenSwiftUICompatibilityTests \
-skipMacroValidation \
-skipPackagePluginValidation
-scheme OpenSwiftUI \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-only-testing:OpenSwiftUICompatibilityTests \
-skipMacroValidation \
-skipPackagePluginValidation \
| xcbeautify --renderer github-actions
env:
OPENSWIFTUI_COMPATIBILITY_TEST: 0
- name: Run compatibility tests on SwiftUI + iOS
run: |
set -o pipefail
xcodebuild test \
-scheme OpenSwiftUI \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-only-testing:OpenSwiftUICompatibilityTests \
-skipMacroValidation \
-skipPackagePluginValidation
-scheme OpenSwiftUI \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-only-testing:OpenSwiftUICompatibilityTests \
-skipMacroValidation \
-skipPackagePluginValidation \
| xcbeautify --renderer github-actions
env:
OPENSWIFTUI_COMPATIBILITY_TEST: 1
10 changes: 8 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,25 @@ jobs:
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Install xcbeautify
run: brew install xcbeautify
- name: Build test target in debug mode
run: |
set -o pipefail
xcodebuild build \
-scheme OpenSwiftUI \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-skipMacroValidation \
-skipPackagePluginValidation
-skipPackagePluginValidation \
| xcbeautify --renderer github-actions
- name: Run test target in debug mode
run: |
set -o pipefail
xcodebuild test \
-scheme OpenSwiftUI \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-skipMacroValidation \
-skipPackagePluginValidation
-skipPackagePluginValidation \
| xcbeautify --renderer github-actions
10 changes: 8 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,32 @@ jobs:
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Install xcbeautify
run: brew install xcbeautify
- name: Build and run tests in debug mode with coverage
run: |
set -o pipefail
swift test \
-c debug \
--filter OpenSwiftUITests \
--filter OpenSwiftUICoreTests \
--enable-code-coverage \
--build-path .build-test-debug
--build-path .build-test-debug \
2>&1 | xcbeautify --renderer github-actions
xcrun llvm-cov show \
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
.build-test-debug/debug/OpenSwiftUIPackageTests.xctest/Contents/MacOS/OpenSwiftUIPackageTests \
> coverage.txt
- name: Build and run tests in release mode
run: |
set -o pipefail
swift test \
-c release \
--filter OpenSwiftUITests \
--filter OpenSwiftUICoreTests \
--enable-code-coverage \
--build-path .build-test-release
--build-path .build-test-release \
2>&1 | xcbeautify --renderer github-actions
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
Loading