-
-
Notifications
You must be signed in to change notification settings - Fork 324
74 lines (66 loc) · 2.09 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: lint
on:
push:
branches:
- main
paths:
- 'Sources/**'
- 'Tests/**'
- 'test-server/**'
- 'Samples/**'
- '.github/workflows/lint.yml'
- 'scripts/ci-select-xcode.sh'
pull_request:
paths:
- 'Sources/**'
- 'Tests/**'
- 'test-server/**'
- 'Samples/**'
- '.github/workflows/lint.yml'
- 'scripts/ci-select-xcode.sh'
- 'Sentry.xcodeproj/**'
- '*.podspec'
# 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:
swift-lint:
name: Swift Lint
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- run: swiftlint --version
- name: Run SwiftLint
run: swiftlint --strict
xcode-analyze:
name: Xcode Analyze
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh
- run: make analyze
lint-podspec:
name: pod lint ${{ matrix.podspec}} ${{ matrix.library_type }} ${{ matrix.platform}}
runs-on: macos-13
strategy:
matrix:
podspec: ['Sentry', 'SentrySwiftUI']
platform: ['ios', 'macos', 'tvos', 'watchos']
library_type: ['dynamic', 'static']
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh
# 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: pod lint Sentry/HybridSDK
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh
- run: pod repo update
- name: Validate HybridPod Podspec
run: pod lib lint ./Tests/HybridSDKTest/HybridPod.podspec --allow-warnings --verbose --platforms=ios "--include-podspecs={SentryPrivate.podspec,Sentry.podspec}"