feat: rewrite async api, introduce ThreatStatus & ThreatReport #2
Workflow file for this run
This file contains hidden or 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: Package build & test | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] | |
| pull_request: | |
| branches: [ "main", "develop" ] | |
| jobs: | |
| build: | |
| name: Build and Test SecurityToolkitTests scheme using any available iPhone simulator | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set Default Scheme | |
| run: | | |
| default="SecurityToolkitTests" | |
| echo $default | cat >default | |
| echo Using default scheme: $default | |
| - name: Build | |
| env: | |
| scheme: ${{ 'default' }} | |
| platform: ${{ 'iOS Simulator' }} | |
| run: | | |
| # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | |
| device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` | |
| if [ $scheme = default ]; then scheme=$(cat default); fi | |
| xcodebuild build-for-testing -scheme "$scheme" -destination "platform=$platform,name=$device" | |
| - name: Test | |
| env: | |
| scheme: ${{ 'default' }} | |
| platform: ${{ 'iOS Simulator' }} | |
| run: | | |
| # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | |
| device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` | |
| if [ $scheme = default ]; then scheme=$(cat default); fi | |
| xcodebuild test -scheme "$scheme" -destination "platform=$platform,name=$device" |