Skip to content

Commit

Permalink
ci: update for tuist
Browse files Browse the repository at this point in the history
  • Loading branch information
watt committed Nov 16, 2024
1 parent 3ef974b commit 82be4f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 54 deletions.
31 changes: 8 additions & 23 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
36 changes: 5 additions & 31 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() }}
Expand All @@ -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)"

0 comments on commit 82be4f3

Please sign in to comment.