test(plan88): Add UDS coverage to Group B files #193
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: Tests and Release | |
| on: | |
| # Manual trigger only - run via workflow_dispatch | |
| workflow_dispatch: | |
| # Required status check for PRs (but doesn't auto-run on commits) | |
| push: | |
| branches: [main] | |
| paths: | |
| - "Sources/**" | |
| - "Tests/**" | |
| - "Package.swift" | |
| - ".github/workflows/tests.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "Sources/**" | |
| - "Tests/**" | |
| - "Package.swift" | |
| - ".github/workflows/tests.yml" | |
| jobs: | |
| test: | |
| name: Run Swift Static Tests | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Python dependencies | |
| run: pip install ruamel.yaml | |
| - name: Validate compose YAML (Plan 82 Phase 4) | |
| run: | | |
| # Check for hardcoded IPs in example compose files | |
| python3 scripts/validate-compose-yaml.py \ | |
| --check-hardcoded-ips \ | |
| --quiet \ | |
| examples/*.yml 2>/dev/null || echo "Note: No example files or validation warnings" | |
| - name: Setup Swift | |
| uses: maartene/setup-swift@main | |
| with: | |
| swift-version: "6.2" | |
| - name: Cache Swift dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Build | |
| run: swift build --build-tests | |
| - name: Run static tests | |
| run: swift test --filter Container-Compose-StaticTests. | |
| - name: Upload static test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: .build/debug/*.xctest | |
| if-no-files-found: ignore | |
| build-release: | |
| name: Build Release Binary | |
| runs-on: macos-26 | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Swift | |
| uses: maartene/setup-swift@main | |
| with: | |
| swift-version: "6.2" | |
| - name: Cache Swift dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-release-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-release- | |
| - name: Build Release | |
| run: swift build -c release | |
| - name: Upload Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: container-compose-release | |
| path: .build/release/container-compose | |
| if-no-files-found: error |