feat: add GitHub CLI shell helper #34
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
| # Workflow: per-target tests for CommonShellInteractiveTests | |
| name: "⚠️ | Test | CommonShellInteractiveTests" | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| tags: [ 'v*.*.*' ] | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| container: swift:6.1-noble | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Restore .build cache | |
| id: restore-build | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: .build | |
| key: swiftpm-build-${{ runner.os }}-${{ hashFiles('**/Package.resolved', '**/Package.swift') }} | |
| restore-keys: | | |
| swiftpm-build-${{ runner.os }}- | |
| - name: Build tests | |
| run: swift build --build-tests --enable-code-coverage | |
| - name: Cache .build (if miss) | |
| if: steps.restore-build.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: .build | |
| key: swiftpm-build-${{ runner.os }}-${{ hashFiles('**/Package.resolved', '**/Package.swift') }} | |
| - name: Run CommonShellInteractiveTests | |
| run: swift test --skip-build --enable-code-coverage --parallel --filter '^CommonShellInteractiveTests\.' |