Feature/v1.2.0 #180
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: build | |
| on: [push, pull_request] | |
| jobs: | |
| run-test: | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| destination: ["iOS Simulator,name=iPhone 16"] | |
| swift-version: [5.9] # ⚠️ 当前使用的 Nimble 和 Quick 在 Swift 6 上编译错误。 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3.6 | |
| bundler-cache: true | |
| - name: Set Xcode version | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "16.2" | |
| - name: Check Xcode | |
| run: xcode-select -p && xcodebuild -version | |
| - name: Check iPhone Simulator | |
| run: | | |
| xcrun simctl list devicetypes iPhone | |
| # - name: Check Cache | |
| # uses: actions/cache@v2 | |
| # id: cocoapods-cache | |
| # with: | |
| # path: Pods | |
| # key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-pods- | |
| - name: Swift Lint | |
| run: brew install swiftlint && swiftlint lint --strict | |
| # - name: Pod Install | |
| # if: steps.cocoapods-cache.outputs.cache-hit != 'true' | |
| # run: bundle exec pod install | |
| - name: Clean Xcode DerivedData | |
| run: | | |
| rm -rf ~/Library/Developer/Xcode/DerivedData/ | |
| - name: Run Unit Tests | |
| env: | |
| DESTINATION: platform=${{ matrix.destination }} | |
| SWIFT_VERSION: ${{ matrix.swift-version }} | |
| run: | | |
| bundle exec fastlane test_ci | |
| bundle exec slather | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |