diff --git a/.github/workflows/VerifyChanges.yaml b/.github/workflows/VerifyChanges.yaml index 198188b..85e7b0c 100644 --- a/.github/workflows/VerifyChanges.yaml +++ b/.github/workflows/VerifyChanges.yaml @@ -1,5 +1,4 @@ name: Verify Changes - on: merge_group: pull_request: @@ -10,7 +9,7 @@ on: jobs: lint: name: Lint - runs-on: macos-15 + runs-on: macos-26 steps: - name: Checkout uses: actions/checkout@v4 @@ -20,10 +19,11 @@ jobs: - name: Lint run: | Scripts/lint + build-and-test: name: Build and Test (${{ matrix.platform }}) needs: lint - runs-on: macos-15 + runs-on: macos-26 strategy: fail-fast: false matrix: @@ -36,31 +36,40 @@ jobs: # xcode_destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" # - platform: watchOS # xcode_destination: "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)" + env: DEV_BUILDS: DevBuilds/Sources + OTHER_XCBEAUTIFY_FLAGS: --renderer github-actions XCCOV_PRETTY_VERSION: 1.2.0 XCODE_SCHEME: DevTesting XCODE_DESTINATION: ${{ matrix.xcode_destination }} XCODE_TEST_PLAN: DevTesting + XCODE_TEST_PRODUCTS_PATH: .build/DevTesting.xctestproducts + steps: + - name: Select Xcode 26.0.0 + run: | + sudo xcode-select -s /Applications/Xcode_26.0.0.app + - name: Checkout uses: actions/checkout@v4 + - name: Checkout DevBuilds uses: actions/checkout@v4 with: repository: DevKitOrganization/DevBuilds path: DevBuilds - - name: Download xccovPretty + + - name: Restore XCTestProducts if: github.event_name != 'push' - run: | - gh release download ${{ env.XCCOV_PRETTY_VERSION }} \ - --repo DevKitOrganization/xccovPretty \ - --pattern "xccovPretty-macos.tar.gz" \ - -O - | tar -xz - chmod +x xccovPretty - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + id: cache-xctestproducts-restore + uses: actions/cache/restore@v4 + with: + path: ${{ env.XCODE_TEST_PRODUCTS_PATH }} + key: cache-xctestproducts-${{ github.workflow }}-${{ github.sha }} + - uses: irgaly/xcode-cache@v1 + if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true' with: key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }} restore-keys: | @@ -70,36 +79,50 @@ jobs: sourcepackages-directory: .build/DerivedData/SourcePackages swiftpm-package-resolved-file: Package.resolved verbose: true - - name: Select Xcode 26.0.0 - run: | - sudo xcode-select -s /Applications/Xcode_26.0.0.app + - name: Build for Testing - run: | - "$DEV_BUILDS"/build_and_test.sh --action build-for-testing - - name: Test + id: build-for-testing + if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true' + run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action build-for-testing + + - name: Test Without Building + id: test-without-building if: github.event_name != 'push' - run: | - "$DEV_BUILDS"/build_and_test.sh --action test + run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action test-without-building + + - name: Save XCTestProducts + if: failure() && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ${{ env.XCODE_TEST_PRODUCTS_PATH }} + key: ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }} + - name: Log Code Coverage if: github.event_name != 'push' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - xcrun xccov view --report .build/DevTesting_test.xcresult --json \ - | ./xccovPretty --github-comment \ - > .build/xccovPretty-${{ matrix.platform }}.output - - name: Upload Logs - uses: actions/upload-artifact@v4 + gh release download ${{ env.XCCOV_PRETTY_VERSION }} \ + --repo DevKitOrganization/xccovPretty \ + --pattern "xccovPretty-macos.tar.gz" \ + -O - \ + | tar -xz + chmod +x xccovPretty + + xcrun xccov view --report .build/DevTesting_test-without-building.xcresult --json \ + | ./xccovPretty --github-comment \ + > .build/xccovPretty-${{ matrix.platform }}.output + + - name: Upload Logs and XCResults if: success() || failure() - with: - name: Logs-${{ matrix.platform }} - path: .build/*.log - include-hidden-files: true - - name: Upload XCResults uses: actions/upload-artifact@v4 - if: success() || failure() with: - name: XCResults-${{ matrix.platform }} - path: .build/*.xcresult + name: Logs_and_XCResults-${{ matrix.platform }} + path: | + .build/*.log + .build/*.xcresult include-hidden-files: true + - name: Upload xccovPretty output if: github.event_name != 'push' uses: actions/upload-artifact@v4 @@ -107,18 +130,21 @@ jobs: name: xccovPrettyOutput-${{ matrix.platform }} path: .build/xccovPretty-${{ matrix.platform }}.output include-hidden-files: true + post-pr-comments: name: Post PR Comments needs: build-and-test + if: ${{ github.event_name == 'pull_request' }} permissions: pull-requests: write runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' }} + steps: - name: Download xccovPretty output uses: actions/download-artifact@v4 with: name: xccovPrettyOutput-macOS + - name: Post Code Coverage Comment uses: thollander/actions-comment-pull-request@v3 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index e297c36..c84036b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # DevTesting Changelog +## 1.2.0: September 24, 2025 + +This update bumps the minimum supported version of Apple’s OSes to 26. + ## 1.1.0: September 17, 2025 diff --git a/CLAUDE.md b/CLAUDE.md index e6ea6f9..633bfb4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -72,7 +72,7 @@ reproducibility. ### Dependencies - **Swift Numerics**: Used for `RealModule` in tests - - **Platform Requirements**: iOS 18+, macOS 15+, tvOS 18+, visionOS 2+, watchOS 11+ + - **Platform Requirements**: Version 26 of Apple's OSes - **Swift Version**: Requires Swift 6.2 toolchain ### Testing Strategy diff --git a/Package.swift b/Package.swift index 96ad1dc..c8bcabe 100644 --- a/Package.swift +++ b/Package.swift @@ -10,11 +10,11 @@ let swiftSettings: [SwiftSetting] = [ let package = Package( name: "DevTesting", platforms: [ - .iOS(.v18), - .macOS(.v15), - .tvOS(.v18), - .visionOS(.v2), - .watchOS(.v11), + .iOS(.v26), + .macOS(.v26), + .tvOS(.v26), + .visionOS(.v26), + .watchOS(.v26), ], products: [ .library( diff --git a/README.md b/README.md index 469a378..87fe892 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ Testing](https://github.com/swiftlang/swift-testing/). - `Stub` and `ThrowingStub` provide stubbing and spying functionality for your mock objects. -DevTesting is fully documented and tested and supports iOS 18+, macOS 15+, tvOS 18+, visionOS 2+, -and watchOS 11+. +DevTesting is fully documented and tested and supports version 26 of Apple’s OSes. View our [changelog](CHANGELOG.md) to see what’s new.