diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 024668a..69ded27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,14 +21,59 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + test: + name: Test + runs-on: macos-15 + needs: [authorize] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set Xcode 16.3 + run: | + sudo xcode-select -switch /Applications/Xcode_16.3.app + xcodebuild -runFirstLaunch + + - name: Download iOS Simulator Runtime + run: xcodebuild -downloadPlatform iOS + + - name: Download tvOS Simulator Runtime + run: xcodebuild -downloadPlatform tvOS + + - name: Carthage Bootstrap + run: carthage bootstrap --use-xcframeworks + + - name: iOS Tests + run: | + xcodebuild test \ + -project Experiment.xcodeproj \ + -scheme Experiment \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' + + - name: macOS Tests + run: | + xcodebuild test \ + -project Experiment.xcodeproj \ + -scheme Experiment \ + -sdk macosx \ + -destination 'platform=macOS' + + - name: tvOS Tests + run: | + xcodebuild test \ + -project Experiment.xcodeproj \ + -scheme Experiment \ + -sdk appletvsimulator \ + -destination 'platform=tvOS Simulator,name=Apple TV,OS=latest' + release: name: Release runs-on: macos-15 - needs: [authorize] + needs: [test] env: SWIFT_DOC_VERSION: '1.0.0-rc.1' steps: - - name: Checkout uses: actions/checkout@v2 @@ -39,36 +84,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: '20' - - - name: Carthage Bootstrap - run: carthage bootstrap --use-xcframeworks - -# - name: iOS Tests -# run: | -# xcodebuild test \ -# -project Experiment.xcodeproj \ -# -scheme Experiment \ -# -sdk iphonesimulator \ -# -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' -# -# - name: macOS Tests -# run: | -# xcodebuild \ -# -project Experiment.xcodeproj \ -# -scheme Experiment \ -# -sdk macosx \ -# -destination 'platform=macosx' \ -# test -# -# - name: tvOS Tests -# run: | -# xcodebuild \ -# -project Experiment.xcodeproj \ -# -scheme Experiment \ -# -sdk appletvsimulator \ -# -destination 'platform=tvOS Simulator,name=Apple TV' \ -# test + node-version: "20" - name: Validate Podfile run: pod lib lint --allow-warnings --verbose @@ -110,4 +126,3 @@ jobs: -p @google/semantic-release-replace-plugin \ -p @semantic-release/exec \ semantic-release -