@@ -76,24 +76,29 @@ jobs:
7676 [ ! -f /usr/local/bin/cmake ] && ln -s /usr/local/bin/cmake $(which cmake) || true
7777 brew install chargepoint/xcparse/xcparse
7878 npm install -g @edusperoni/junit-cli-report-viewer verify-junit-xml
79+ - name : Prepare test folder
80+ id : prepare-test-folder
81+ run : |
82+ mkdir -p dist-test
83+ echo TEST_FOLDER=$(pwd)/dist-test >> $GITHUB_ENV
7984 - name : Xcode Tests
8085 uses : nick-fields/retry@v2
8186 # try to run the tests with xcpretty. If it fails then try again without xcpretty twice for better log output
8287 # the xcode tests are a bit flaky and they should never fail on this step, as this step only collects the JS test results as junit xml
8388 with :
8489 timeout_minutes : 20
8590 max_attempts : 3
86- command : set -o pipefail && xcodebuild -project v8ios.xcodeproj -scheme TestRunner -resultBundlePath $HOME /test_results -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPhone\ 14\ Pro\ Max build test | xcpretty
87- on_retry_command : rm -rf $HOME /test_results*
88- new_command_on_retry : xcodebuild -project v8ios.xcodeproj -scheme TestRunner -resultBundlePath $HOME /test_results -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPhone\ 14\ Pro\ Max build test
91+ command : set -o pipefail && xcodebuild -project v8ios.xcodeproj -scheme TestRunner -resultBundlePath $TEST_FOLDER /test_results -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPhone\ 14\ Pro\ Max build test | xcpretty
92+ on_retry_command : rm -rf $TEST_FOLDER /test_results*
93+ new_command_on_retry : xcodebuild -project v8ios.xcodeproj -scheme TestRunner -resultBundlePath $TEST_FOLDER /test_results -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPhone\ 14\ Pro\ Max build test
8994 - name : Validate Test Results
9095 run : |
91- xcparse attachments $HOME /test_results.xcresult $HOME /test-out
92- find $HOME /test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx junit-cli-report-viewer
93- find $HOME /test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx verify-junit-xml
96+ xcparse attachments $TEST_FOLDER /test_results.xcresult $TEST_FOLDER /test-out
97+ find $TEST_FOLDER /test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx junit-cli-report-viewer
98+ find $TEST_FOLDER /test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx verify-junit-xml
9499 - name : Archive Test Result Data
95100 if : always()
96101 uses : actions/upload-artifact@v3
97102 with :
98103 name : test-results
99- path : ${{env.HOME }}/test_results.xcresult
104+ path : ${{env.TEST_FOLDER }}/test_results.xcresult
0 commit comments