ref: Convert SentryScopeObserver to Swift #1584
Workflow file for this run
This file contains hidden or 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: Lint CocoaPods Specs | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Concurrency configuration: | |
# - We use workflow-specific concurrency groups to prevent multiple lint runs on the same code, | |
# as linting checks are deterministic and don't require parallel validation. | |
# - For pull requests, we cancel in-progress runs when new commits are pushed since only the | |
# latest linting matters for merge decisions. | |
# - For main branch pushes, we never cancel formatting checks to ensure our code maintains consistent style | |
# standards across the entire project. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
files-changed: | |
name: Detect File Changes | |
runs-on: ubuntu-latest | |
outputs: | |
run_lint_cocoapods_specs_for_prs: ${{ steps.changes.outputs.run_lint_cocoapods_specs_for_prs }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Get changed files | |
id: changes | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
with: | |
token: ${{ github.token }} | |
filters: .github/file-filters.yml | |
lint-podspec: | |
name: ${{ matrix.podspec}} ${{ matrix.library_type }} ${{ matrix.platform}} | |
# Run the job only for PRs with related changes or non-PR events. | |
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_lint_cocoapods_specs_for_prs == 'true' | |
needs: files-changed | |
runs-on: macos-14 | |
strategy: | |
fail-fast: false | |
matrix: | |
podspec: ["Sentry", "SentrySwiftUI"] | |
platform: ["ios", "macos", "tvos", "watchos"] | |
library_type: ["dynamic", "static"] | |
steps: | |
- uses: actions/checkout@v5 | |
- run: ./scripts/ci-select-xcode.sh 15.4 | |
# We need to update the spec-repo, because it can happen that it is not up to date and then the lint fails. | |
- run: pod repo update | |
- name: Validate Podspec | |
run: ./scripts/pod-lib-lint.sh ${{ matrix.platform }} ${{ matrix.podspec}} ${{ matrix.library_type}} | |
- name: Run CI Diagnostics | |
if: failure() | |
run: ./scripts/ci-diagnostics.sh | |
lint-hybrid-sdk-podspec: | |
name: Sentry/HybridSDK | |
# Run the job only for PRs with related changes or non-PR events. | |
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_lint_cocoapods_specs_for_prs == 'true' | |
needs: files-changed | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v5 | |
- run: ./scripts/ci-select-xcode.sh 15.4 | |
- run: pod repo update | |
- name: Validate HybridPod Podspec | |
run: pod lib lint ./Tests/HybridSDKTest/HybridPod.podspec --allow-warnings --verbose --platforms=ios "--include-podspecs={Sentry.podspec}" | |
- name: Run CI Diagnostics | |
if: failure() | |
run: ./scripts/ci-diagnostics.sh | |
lint_cocoapods_Specs-required-check: | |
needs: | |
[ | |
files-changed, | |
lint-podspec, | |
lint-hybrid-sdk-podspec, | |
] | |
name: Lint CocoaPods Specs | |
# This is necessary since a failed/skipped dependent job would cause this job to be skipped | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
# If any jobs we depend on fails gets cancelled or times out, this job will fail. | |
# Skipped jobs are not considered failures. | |
- name: Check for failures | |
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
run: | | |
echo "One of the CocoaPods specs linting jobs has failed." && exit 1 |