Update README.md #16
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
| # This workflow will build a Swift project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
| name: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test NetLens with Swift 6 | |
| runs-on: macos-14 # macOS 14 pour Xcode 16+ | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode 16 (Swift 6.0) | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.2.0' | |
| - name: Verify Swift version | |
| run: | | |
| swift --version | |
| echo "Xcode version:" | |
| xcodebuild -version | |
| - name: Build NetLens | |
| run: swift build -v | |
| - name: Run Swift Testing tests | |
| run: swift test --enable-code-coverage | |
| - name: Generate coverage report | |
| run: | | |
| xcrun llvm-cov export -format="lcov" \ | |
| .build/debug/NetLensPackageTests.xctest/Contents/MacOS/NetLensPackageTests \ | |
| -instr-profile .build/debug/codecov/default.profdata > coverage.lcov | |
| continue-on-error: true | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: coverage.lcov | |
| fail_ci_if_error: false | |
| build-ios: | |
| name: Build for iOS Simulator | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode 16 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.2.0' | |
| - name: List available simulators | |
| run: xcrun simctl list devices available | |
| - name: Build for iOS 18 Simulator | |
| run: | | |
| xcodebuild build \ | |
| -scheme NetLens \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.2' \ | |
| -configuration Debug \ | |
| -showBuildTimingSummary | |
| build-macos: | |
| name: Build for macOS | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode 16 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.2.0' | |
| - name: Build for macOS | |
| run: | | |
| xcodebuild build \ | |
| -scheme NetLens \ | |
| -destination 'platform=macOS,arch=arm64' \ | |
| -configuration Debug \ | |
| -showBuildTimingSummary |