name: Test (feature branches) on: pull_request: branches: - "feature/*" jobs: wake-macos-vm: runs-on: macos-ctl steps: - name: Start macOS VM container run: docker start macos test: needs: wake-macos-vm runs-on: macos-release steps: - name: Checkout run: | export GIT_TERMINAL_PROMPT=0 export GIT_ASKPASS=/bin/false export SSH_ASKPASS=/bin/false REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")" git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" . git checkout "${{ gitea.sha }}" - name: Run unit tests run: | xcodebuild test \ -project PediFoods.xcodeproj \ -scheme "PediFoods" \ -destination "platform=iOS Simulator,name=iPhone 16,OS=latest" sleep-macos-vm: needs: test if: always() runs-on: macos-ctl steps: - name: Stop macOS VM container run: docker stop macos