[github-action] Try to workaround visionOS simulator bug in unit tests

Seems need to boot the simulator firstly, other platforms does not has this issue
This commit is contained in:
DreamPiggy 2024-02-24 14:47:17 +08:00
parent 963539caa6
commit a22e8416af
1 changed files with 5 additions and 2 deletions

View File

@ -137,19 +137,22 @@ jobs:
run: | run: |
rm -rf ~/Library/Developer/Xcode/DerivedData/ rm -rf ~/Library/Developer/Xcode/DerivedData/
mkdir DerivedData mkdir DerivedData
- if: ${{ matrix.platform }} == 'visionOS'
run: xcrun simctl boot "Apple Vision Pro"
- name: Run test - name: Run test
run: | run: |
set -o pipefail set -o pipefail
xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests ${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO xcodebuild test -workspace "${{ env.WORKSPACE_NAME }}" -scheme "Tests ${{ matrix.scheme }}" -destination "${{ matrix.destination }}" -configuration Debug CODE_SIGNING_ALLOWED=NO
mv ~/Library/Developer/Xcode/DerivedData/ "./DerivedData/{{ matrix.platform }}" mv ~/Library/Developer/Xcode/DerivedData/ "./DerivedData/${{ matrix.platform }}"
- name: Code Coverage - name: Code Coverage
run: | run: |
set -o pipefail set -o pipefail
export PATH="/usr/local/opt/curl/bin:$PATH" export PATH="/usr/local/opt/curl/bin:$PATH"
curl --version curl --version
bash <(curl -s https://codecov.io/bash) -v -D "./DerivedData/{{ matrix.platform }}" -J '^SDWebImage$' -c -X gcov -F "{{ matrix.platform }}" bash <(curl -s https://codecov.io/bash) -v -D "./DerivedData/${{ matrix.platform }}" -J '^SDWebImage$' -c -X gcov -F "${{ matrix.platform }}"
Build: Build:
name: Build Library name: Build Library