Tuist project configuration #922
Workflow file for this run
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
name: Swift CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
XCODE_VERSION: 15.1 | |
IOS_DESTINATION: platform=iOS Simulator,OS=17.2,name=iPad (10th generation) | |
TUIST_TEST_DEVICE: iPad (10th generation) | |
TUIST_TEST_PLATFORM: iOS | |
TUIST_TEST_OS: 17.2 | |
jobs: | |
development-tests: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
scheme: | |
- UnitTests | |
- SnapshotTests | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jdx/mise-action@v2 | |
- name: Switch Xcode | |
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app | |
- name: Install dependencies | |
run: tuist install --path Samples | |
- name: Test iOS | |
run: tuist test --path Samples ${{ matrix.scheme }} | |
package-tests: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Switch Xcode | |
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app | |
# Command line swift runs on the host platform. | |
# On macOS we can run all tests, including macro tests. | |
- name: Test macOS | |
run: swift test | |
tutorial: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Uses version specified in .ruby_version | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Switch Xcode | |
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app | |
- name: Tutorial App | |
run: | | |
cd Samples/Tutorial | |
bundle exec pod install | |
set -o pipefail | |
xcodebuild \ | |
-workspace Tutorial.xcworkspace \ | |
-scheme Tutorial \ | |
-destination "$IOS_DESTINATION" \ | |
build test | bundle exec xcpretty | |
documentation-lint: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Uses version specified in .ruby_version | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Switch Xcode | |
run: sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app | |
- name: Install sourcedocs | |
run: brew install sourcedocs | |
- name: Swiftdocs | |
run: | | |
.buildscript/build_swift_docs.sh ${{ runner.temp }}/swiftdocs |