Skip to content

chore(ci): Update concurrency configuration across workflows #39

chore(ci): Update concurrency configuration across workflows

chore(ci): Update concurrency configuration across workflows #39

name: Lint CocoaPods Specs
on:
push:
branches:
- main
paths:
- "Sources/**"
- "Tests/**"
- "test-server/**"
- "Samples/**"
- ".github/workflows/lint-cocoapods-specs.yml"
- "scripts/ci-select-xcode.sh"
- "Makefile" # Make commands used for linting setup
- "Brewfile*" # Tools installation affects linting environment
- ".swiftlint.yml"
pull_request:
paths:
- "Sources/**"
- "Tests/**"
- "test-server/**"
- "Samples/**"
- ".github/workflows/lint-cocoapods-specs.yml"
- "scripts/ci-select-xcode.sh"
- "Sentry.xcodeproj/**"
- "*.podspec"
- "Gemfile.lock"
- "Makefile" # Make commands used for linting setup
- "Brewfile*" # Tools installation affects linting environment
- ".swiftlint.yml"
# 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 == 'push' && github.ref == 'refs/heads/main') }}
jobs:
lint-podspec:
name: ${{ matrix.podspec}} ${{ matrix.library_type }} ${{ matrix.platform}}
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@v4
- 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}}
lint-hybrid-sdk-podspec:
name: Sentry/HybridSDK
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- 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}"