Repository navigation
feat!: adopt Swift 6.2 strict concurrency and update TCA to 1.26.2 #35
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: "blade" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| paths: | |
| - '.swiftlint.yml' | |
| - ".github/workflows/**" | |
| - "Package*.swift" | |
| - "Sources/**" | |
| - "Tests/**" | |
| jobs: | |
| SwiftLint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: GitHub Action for SwiftLint | |
| uses: norio-nomura/action-swiftlint@3.2.1 | |
| with: | |
| args: --strict | |
| env: | |
| DIFF_BASE: ${{ github.base_ref }} | |
| macOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runsOn }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - xcode: "Xcode_16.4" | |
| runsOn: macos-15 | |
| name: "macOS 15, Xcode 16.4, Swift 6.1" | |
| params: "-skipMacroValidation" | |
| - xcode: "Xcode_26.5" | |
| runsOn: macos-26 | |
| name: "macOS 26, Xcode 26.5" | |
| params: "-skipMacroValidation" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ${{ matrix.name }} | |
| run: xcodebuild test -scheme "Blade-Package" -destination "platform=macOS" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.5.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| xcode: true | |
| xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: test_output | |
| iOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runsOn }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - destination: "platform=iOS Simulator,name=iPhone 16 Pro" | |
| name: "iOS 18" | |
| xcode: "Xcode_16.4" | |
| runsOn: macos-15 | |
| params: "-skipMacroValidation" | |
| - destination: "platform=iOS Simulator,name=iPhone 17 Pro" | |
| name: "iOS 26" | |
| xcode: "Xcode_26.5" | |
| runsOn: macos-26 | |
| params: "-skipMacroValidation" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ${{ matrix.name }} | |
| run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: test_output | |
| tvOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runsOn }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - destination: "platform=tvOS Simulator,name=Apple TV" | |
| name: "tvOS 18" | |
| xcode: "Xcode_16.4" | |
| runsOn: macos-15 | |
| params: "-skipMacroValidation" | |
| - destination: "platform=tvOS Simulator,name=Apple TV" | |
| name: "tvOS 26" | |
| xcode: "Xcode_26.5" | |
| runsOn: macos-26 | |
| params: "-skipMacroValidation" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ${{ matrix.name }} | |
| run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.5.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| xcode: true | |
| xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: test_output | |
| watchOS: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runsOn }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - destination: "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)" | |
| name: "watchOS 11" | |
| xcode: "Xcode_16.4" | |
| runsOn: macos-15 | |
| params: "-skipMacroValidation" | |
| - destination: "platform=watchOS Simulator,name=Apple Watch Series 11 (46mm)" | |
| name: "watchOS 26" | |
| xcode: "Xcode_26.5" | |
| runsOn: macos-26 | |
| params: "-skipMacroValidation" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ${{ matrix.name }} | |
| run: xcodebuild test -scheme "Blade-Package" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES ${{ matrix.params }} -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4.5.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| xcode: true | |
| xcode_archive_path: test_output/${{ matrix.name }}.xcresult | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: test_output | |
| spm: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.runsOn }} | |
| env: | |
| DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer" | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: "Xcode 16" | |
| xcode: "Xcode_16.4" | |
| runsOn: macos-15 | |
| - name: "Xcode 26" | |
| xcode: "Xcode_26.5" | |
| runsOn: macos-26 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Toolchain versions | |
| run: | | |
| swift --version | |
| xcodebuild -version | |
| - name: ${{ matrix.name }} | |
| run: | | |
| swift build --target "Blade" | |
| swift build --target "BladeTCA" | |
| merge-test-reports: | |
| needs: [iOS, macOS, watchOS, tvOS] | |
| runs-on: macos-15 | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: test_output | |
| - run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult | |
| - name: Upload Merged Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MergedResult | |
| path: test_output/final | |
| discover-typos: | |
| name: Discover Typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Discover typos | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install codespell | |
| codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*" |