test: add integration test using Cocoapods #3
Workflow file for this run
This file contains 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: Integration Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- ".github/workflows/integration-test.yml" | |
- "*.xcodeproj" | |
- "*.xcworkspace" | |
- "Samples/iOS-Cocoapods-*/**" | |
- "scripts/ci-select-xcode.sh" | |
- "Sources/**" | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
cocoapods: | |
name: Integration Test for ${{ matrix.sample.name }} | |
runs-on: macos-15 | |
strategy: | |
matrix: | |
sample: | |
- name: "iOS-Cocoapods-Swift6" | |
path: Samples/iOS-Cocoapods-Swift6 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Select Xcode | |
run: ./scripts/ci-select-xcode.sh 16 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # v1.221.0 | |
with: | |
bundler-cache: true | |
- name: Run Integration Test | |
run: bundle exec fastlane cocoapods_integration_test | |
working-directory: ${{ matrix.sample.path }} | |
- name: Upload Result Bundle | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: integration-test-${{matrix.sample.name}}.xcresult | |
path: fastlane/test_results/results.xcresult |