chore: add CodeRabbit configuration #24
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
| # CI for swift-sdk (ARCP). | |
| # | |
| # Action pinning policy: | |
| # - First-party actions (actions/*) are pinned to a major version tag. | |
| # - Third-party actions are pinned to a full commit SHA with a version comment. | |
| # | |
| # Platforms: macOS only (Package.swift declares .macOS(.v14); no Linux platform). | |
| # Swift matrix: 6.1 — floor declared by `// swift-tools-version: 6.1`. The full | |
| # ecosystem (swift-nio, swift-log, swift-certificates, swift-crypto) now | |
| # requires 6.1+, so the previous 6.0 entry no longer resolves. | |
| name: test | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".editorconfig" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".editorconfig" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: swift ${{ matrix.swift }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest] | |
| swift: ["6.1"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Swift ${{ matrix.swift }} | |
| # SwiftyLab/setup-swift v1.14.0 | |
| uses: SwiftyLab/setup-swift@38f54a76b70d989321de9dc7c840618c08cf56e9 | |
| with: | |
| swift-version: ${{ matrix.swift }} | |
| - name: Print Swift version | |
| run: swift --version | |
| - name: Cache .build | |
| uses: actions/cache@v5 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-swift-${{ matrix.swift }}-spm-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-swift-${{ matrix.swift }}-spm- | |
| - name: Resolve dependencies | |
| run: swift package resolve | |
| - name: Lint (swift-format) | |
| run: swift run swift-format lint --recursive --strict Sources Tests | |
| - name: Build | |
| run: swift build --build-tests | |
| - name: Test | |
| run: swift test --skip-build | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-artifacts-swift-${{ matrix.swift }}-${{ matrix.os }} | |
| path: | | |
| .build/**/*.xctest | |
| .build/**/*.log | |
| .build/debug/codecov/** | |
| if-no-files-found: ignore | |
| retention-days: 7 |