GT run tests workflow #2
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: Run Tests | |
on: | |
push: | |
branches: [ develop, master, feature/* ] | |
pull_request: | |
branches: [ develop, master, feature/* ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: macos-14 | |
env: | |
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Select Xcode Version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.4.0' | |
# Required for KotlinMultiplatform | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version-file: ".java-version" | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Cache Cocoapods | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cocoapods/repos | |
key: ${{ runner.os }}-cocoapods-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-cocoapods- | |
- name: Cache Konan | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-konan- | |
- name: Pod install | |
run: bundle exec pod install --repo-update | |
# - name: Run Tests | |
# run: xcodebuild test -scheme GodTools-Production -sdk iphonesimulator17.5 -destination "OS=17.5,name=iPhone 15" | |
# - name: Upload Xcode Code Coverage Report to CodeCov | |
# uses: codecov/codecov-action@v4 | |
# with: | |
# fail_ci_if_error: true | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# verbose: true | |
# xcode: true | |
# - name: Run UITests | |
# run: bundle exec fastlane cru_shared_lane_run_tests scheme:GodTools-UITests reset_simulator:true should_clear_derived_data:true | |
- name: Run Tests and Generate Code Coverage Report (.xcresult) | |
run: bundle exec fastlane cru_shared_lane_run_tests output_directory:fastlane_scan_output_directory result_bundle:true reset_simulator:true should_clear_derived_data:true | |
- name: Upload Xcode Code Coverage Report to CodeCov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
xcode: true | |
xcode_archive_path: /Users/runner/work/godtools-swift/godtools-swift/fastlane_scan_output_directory/GodTools-Production.xcresult |