Fix CI failures: remove macOS-incompatible timeout commands and add proper GitHub Actions permissions #67
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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| timeout-minutes: 2 | |
| - name: Build package | |
| run: swift build | |
| timeout-minutes: 5 | |
| - name: Run tests | |
| run: swift test | |
| timeout-minutes: 3 | |
| code-quality: | |
| name: Code Quality (Optional) | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| timeout-minutes: 2 | |
| - name: Install tools | |
| run: | | |
| brew install swiftlint swift-format || echo "Tool installation failed - skipping quality checks" | |
| timeout-minutes: 6 | |
| - name: Quick lint check | |
| run: | | |
| if command -v swiftlint >/dev/null 2>&1; then | |
| swiftlint || echo "Linting issues found" | |
| else | |
| echo "SwiftLint not available - skipping" | |
| fi | |
| timeout-minutes: 2 |