Harden Afterimage capture, matching, and data pipeline #7
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify data pipeline safety | |
| run: | | |
| python3 -m unittest discover -s DataPipeline -p 'test_*.py' -v | |
| python3 -m compileall -q DataPipeline | |
| - name: Verify bundled database integrity | |
| run: | | |
| RESULT="$(sqlite3 Afterimage/Resources/photos.db 'PRAGMA integrity_check;')" | |
| test "$RESULT" = "ok" | |
| - name: Build release configuration | |
| run: | | |
| xcodebuild build \ | |
| -scheme "Afterimage" \ | |
| -configuration Release \ | |
| -destination "generic/platform=iOS Simulator" \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Run tests | |
| run: | | |
| SIMULATOR_ID="$(xcrun simctl list devices available | awk -F '[()]' '/iPhone/ { print $2; exit }')" | |
| if [ -z "$SIMULATOR_ID" ]; then | |
| echo "No available iPhone simulator found" | |
| xcrun simctl list devices available | |
| exit 1 | |
| fi | |
| xcodebuild test \ | |
| -scheme "Afterimage" \ | |
| -destination "platform=iOS Simulator,id=${SIMULATOR_ID}" \ | |
| CODE_SIGNING_ALLOWED=NO |