Merge pull request #19 from Squarespace/avyazovoy/ci-improvements #17
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: ci | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
run_pod_tests: | |
name: Run pod tests | |
strategy: | |
matrix: | |
os: [macos-12, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Define validation directory | |
id: define_validation_dir | |
run: echo "path=${{ runner.temp }}/validation_${{ github.run_number }}_${{ github.run_attempt }}" >> $GITHUB_OUTPUT | |
- name: Run pod unit tests | |
run: | | |
bundle exec pod lib lint \ | |
--allow-warnings \ | |
--validation-dir="${{ steps.define_validation_dir.outputs.path }}" \ | |
--no-clean | |
- name: Upload test artifacts | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test_artifacts | |
path: ${{ steps.define_validation_dir.outputs.path }} | |
- name: Run SPM unit tests | |
run: | | |
xcodebuild test \ | |
-scheme swift-simple-source \ | |
-destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=latest' \ | |
| xcbeautify |