Skip to content
Open
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
36 changes: 36 additions & 0 deletions .github/actions/uitests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Run UI Tests
description: Execute UI tests and collect artifacts if failure

inputs:
xcode-version:
description: 'Xcode version to use'
required: false
default: '16.4'
platform:
description: 'Platform to test (ios or macos)'
required: true
Expand All @@ -20,16 +24,47 @@ outputs:
runs:
using: composite
steps:
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ inputs.xcode-version }}

- name: Set up mise
uses: jdx/mise-action@v2
with:
install: false
cache: false

- name: Install Tuist
run: |
cd Example
mise trust mise.toml
mise install
tuist version
shell: bash

- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash

- name: Install xcbeautify
shell: bash
run: brew install xcbeautify

- name: Generate Example project
shell: bash
run: |
cd Example
mise exec -- tuist install
mise exec -- tuist generate --no-open
Comment thread
Kyle-Ye marked this conversation as resolved.

- name: Record baseline images with SwiftUI
shell: bash
run: |
cd Example
set -o pipefail
NSUnbufferedIO=YES xcodebuild test \
-workspace Example.xcworkspace \
-scheme SUI_UITests \
-destination "${{ inputs.destination }}" \
-skipMacroValidation \
Expand All @@ -45,6 +80,7 @@ runs:
rm -rf /tmp/${{ inputs.platform }}-uitest.xcresult
set -o pipefail
NSUnbufferedIO=YES xcodebuild test \
-workspace Example.xcworkspace \
-scheme OSUI_UITests \
-destination "${{ inputs.destination }}" \
-skipMacroValidation \
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/uitests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,11 @@ jobs:
with:
repository: ${{ needs.prepare_issue_comment.outputs.repository || github.repository }}
ref: ${{ needs.prepare_issue_comment.outputs.ref || github.sha }}
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Run UI Tests
id: run-tests
uses: ./.github/actions/uitests
with:
xcode-version: ${{ matrix.xcode-version }}
platform: ios
destination: "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}"
artifact-name: ios-uitest-snapshots-${{ matrix.ios-version }}
Expand Down Expand Up @@ -267,17 +261,11 @@ jobs:
with:
repository: ${{ needs.prepare_issue_comment.outputs.repository || github.repository }}
ref: ${{ needs.prepare_issue_comment.outputs.ref || github.sha }}
- name: Setup Xcode
uses: OpenSwiftUIProject/setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Set up build environment
run: Scripts/CI/darwin_setup_build.sh
shell: bash
- name: Run UI Tests
id: run-tests
uses: ./.github/actions/uitests
with:
xcode-version: ${{ matrix.xcode-version }}
platform: macos
destination: "platform=macOS"
artifact-name: macos-uitest-snapshots
Expand Down
4 changes: 4 additions & 0 deletions Example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Derived/
Example.xcodeproj/
Example.xcworkspace/
Tuist/.build/
1,435 changes: 0 additions & 1,435 deletions Example/Example.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading