diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 201ff1434..2c76d3ffb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,28 +12,13 @@ jobs: runs-on: macos-14-xlarge steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 - - name: Read env - run: cat .github/workflows/env.properties >> $GITHUB_ENV + - name: Run swiftformat + run: swiftformat --lint . - - name: Switch to Xcode ${{ env.xcode_version }} - run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app - - - name: Cache SPM build - uses: actions/cache@v2 - with: - path: .build - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} - restore-keys: | - ${{ runner.os }}-spm- - - - name: Run SwiftFormat - run: | - swift run -c release swiftformat --lint . - - - name: Report error - if: ${{ failure() }} - run: | - echo '::error::SwiftFormat linting failed. Run `Scripts/swiftformat` to format your code.' + - name: Report error + if: ${{ failure() }} + run: | + echo '::error::SwiftFormat linting failed. Run `Scripts/swiftformat` to format your code.' diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2ac73dd31..350f1d562 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,6 +32,7 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 - name: Read env run: cat .github/workflows/env.properties >> $GITHUB_ENV @@ -46,9 +47,11 @@ jobs: if: ${{ matrix.installation_required }} run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}" + - name: Install dependencies + run: tuist install --path SampleApp + - name: Build & Test - run: | - xcodebuild -scheme "BlueprintUI-Package" -destination "${{ matrix.destination }}" build test + run: tuist test --path SampleApp -destination "${{ matrix.destination }}" UnitTests - name: Package snapshot changes if: ${{ failure() }} @@ -61,32 +64,3 @@ jobs: with: name: snapshot_changes_${{ matrix.sdk }} path: snapshot_changes_${{ matrix.sdk }}.tar - - - cocoapods: - name: "CocoaPods" - - runs-on: macos-14-xlarge - - steps: - - uses: actions/checkout@v4 - - - name: Read env - run: cat .github/workflows/env.properties >> $GITHUB_ENV - - - name: Switch to Xcode ${{ env.xcode_version }} - run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - # Uses version specified in .ruby_version - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - - name: Pod Install - run: | - bundle exec pod install --project-directory=SampleApp/ - - - name: Build & Test - run: | - xcodebuild -workspace SampleApp/SampleApp.xcworkspace -scheme "BlueprintUI-Unit-Tests" -destination "platform=iOS Simulator,OS=17.2,name=iPhone SE (3rd generation)"