Skip to content

test: Use XCTestExpectation for FlushTests #136

test: Use XCTestExpectation for FlushTests

test: Use XCTestExpectation for FlushTests #136

name: Lint SwiftLint
on:
push:
branches:
- main
paths:
- "Sources/**"
- "Tests/**"
- "test-server/**"
- "Samples/**"
- ".github/workflows/lint-swiftlint-formatting.yml"
- "scripts/ci-select-xcode.sh"
pull_request:
paths:
- "Sources/**"
- "Tests/**"
- "test-server/**"
- "Samples/**"
- ".github/workflows/lint-swiftlint-formatting.yml"
- "scripts/ci-select-xcode.sh"
- "Sentry.xcodeproj/**"
- "*.podspec"
- "Gemfile.lock"
# 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:
lint:
name: Lint
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install tooling
run: make init-ci-format
- run: swiftlint --version
- name: Run SwiftLint
run: swiftlint --strict