Setup code coverage #120
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: iOS Tests | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**.md' | |
jobs: | |
ios-tests: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.29.0' | |
channel: 'stable' | |
- name: Verify Flutter Installation | |
run: flutter doctor -v | |
- name: Install dependencies | |
run: | | |
brew install xcresultparser | |
flutter pub get | |
cd example/ios | |
pod install | |
cd ../.. | |
- name: Run tests | |
run: | | |
xcodebuild test -workspace ./example/ios/Runner.xcworkspace \ | |
-scheme EventideTests \ | |
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \ | |
-resultBundlePath build/reports/EventideTests.xcresult | |
- name: Prepare coverage xml file | |
run: | | |
xcresultparser \ | |
--output-format cobertura \ | |
build/reports/EventideTests.xcresult > build/reports/ios-coverage.xml | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
files: build/reports/ios-coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |