WIP Fix tests.yml #55
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: tests | |
on: [push, pull_request] | |
jobs: | |
run-tests: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: List available Xcode versions | |
run: ls /Applications | grep Xcode | |
- name: Select Xcode | |
run: sudo xcode-select -switch /Applications/Xcode_16.1.app && /usr/bin/xcodebuild -version | |
- name: Show path | |
run: pwd; ls | |
- name: Show Destinations | |
run: xcodebuild -showdestinations -scheme HierarchyResponderTests -project Tests/HierarchyResponderTests.xcodeproj | xcpretty | |
- name: Run unit tests | |
run: | | |
xcodebuild test -scheme HierarchyResponderTests -project Tests/HierarchyResponderTests.xcodeproj -destination "platform=iOS Simulator,name=iPhone 15" -derivedDataPath Build/ | xcpretty | |
cd Build/Build/ProfileData | |
cd $(ls -d */|head -n 1) | |
directory=${PWD##*/} | |
pathCoverage=Build/Build/ProfileData/${directory}/Coverage.profdata | |
cd ../../../../ | |
xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage Build/Build/Products/Debug-iphonesimulator/HierarchyResponderTests.app/HierarchyResponderTests > info.lcov | |
bash <(curl https://codecov.io/bash) |