Skip to content

Commit

Permalink
ci: split fastlane ci step to independent jobs to run in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed May 14, 2024
1 parent 86091d5 commit c835cfb
Showing 1 changed file with 78 additions and 4 deletions.
82 changes: 78 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
RUBY_VERSION: '3.1'

jobs:
sdk:
test:
name: Test SDK
runs-on: macos-latest
steps:
Expand All @@ -47,16 +47,90 @@ jobs:
bundler-cache: true

- run: |
bundle exec fastlane ci
bundle exec fastlane test
timeout-minutes: 10
- if: github.event_name == 'push'
- run: |
bundle exec fastlane pod_size
cp .lint/cocoapods-size/result.json cocoapods-size-result.json
timeout-minutes: 25
- if: github.event_name == 'push'
uses: actions/cache@v4
with:
path: cocoapods-size-result.json
key: cocoapods-size-${{ github.sha }}

resources-lint:
name: Lint Resources
needs: test
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- name: Use Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -switch /Applications/Xcode_${XCODE_VERSION}.app

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- run: bundle exec fastlane html_lint

- run: bundle exec fastlane xcprivacy_lint

pod-lint:
name: Lint Podspec
needs: test
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- name: Use Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -switch /Applications/Xcode_${XCODE_VERSION}.app

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- run: bundle exec fastlane pod_lint

carthage-build:
name: Carthage Build
needs: test
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- name: Use Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -switch /Applications/Xcode_${XCODE_VERSION}.app

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- run: bundle exec fastlane carthage_lint

swift-package-build:
name: Swift Package Build
needs: test
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- name: Use Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -switch /Applications/Xcode_${XCODE_VERSION}.app

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- run: bundle exec fastlane spm_lint

size-report:
name: Cocoapods size report
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -122,7 +196,7 @@ jobs:

samples:
name: Build Samples
needs: sdk
needs: test
runs-on: macos-14
continue-on-error: ${{ matrix.experimental }}
strategy:
Expand Down

0 comments on commit c835cfb

Please sign in to comment.