Update Testing.yml #270
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: Testing | |
on: [push, pull_request] | |
env: | |
# TUIST_CONFIG_CLOUD_TOKEN: ${{ secrets.TUIST_CONFIG_CLOUD_TOKEN }} | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
jobs: | |
test: | |
name: Testing SWDestiny Trades app | |
runs-on: macOS-13 | |
strategy: | |
matrix: | |
scheme: [ | |
SWDestinyTrades | |
] | |
workspace: [ | |
swdestiny-trades.xcworkspace | |
] | |
destination: [ | |
'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.0.1' | |
] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Xcode version | |
uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: 15.0.1 | |
- name: Install Mint | |
run: | | |
brew install mint | |
shell: bash | |
- name: Install Tuist | |
run: | | |
bash <(curl -Ls https://install.tuist.io) | |
shell: bash | |
- name: Fetch tuist dependencies | |
run: | | |
tuist fetch | |
shell: bash | |
#- name: Tuist Warm Cache | |
# run: | | |
# tuist cache warm | |
# shell: bash | |
- name: Generate project with tuist | |
run: | | |
tuist generate --no-open | |
shell: bash | |
- name: Cache Mint packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.mint/bin | |
~/.mint/packages | |
key: ${{ runner.os }}-mint-${{ env.cache-name }}-${{ hashFiles('~/.mint/metadata.json') }} | |
restore-keys: | | |
${{ runner.os }}-mint- | |
${{ runner.os }}-mint-${{ env.cache-name }}- | |
${{ runner.os }}-mint- | |
${{ runner.os }}- | |
- name: Install Mint Dependencies | |
run: | | |
mint bootstrap | |
shell: bash | |
- name: Test ${{ matrix.scheme }} on ${{ matrix.destination }} | |
run: | | |
xcodebuild -workspace ${{ matrix.workspace }} -scheme ${{ matrix.scheme }} -destination '${{ matrix.destination }}' -enableCodeCoverage YES test | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] |