-
-
Notifications
You must be signed in to change notification settings - Fork 39
81 lines (65 loc) · 1.89 KB
/
pull-request.yml
File metadata and controls
81 lines (65 loc) · 1.89 KB
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
75
76
77
78
79
80
name: Pull Request
on:
pull_request:
branches: [main]
paths:
- '**.swift'
- '**.xcodeproj/**'
- '**.xctestplan'
- '.github/workflows/pull-request.yml'
env:
APP_NAME: BetterCapture
SCHEME: BetterCapture
XCODE_VERSION: '26.0'
jobs:
lint:
name: Lint
runs-on: macos-26
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
build:
name: Build
runs-on: macos-26
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Show Xcode version
run: xcodebuild -version
- name: Build application
run: |
xcodebuild build \
-project "${{ env.APP_NAME }}.xcodeproj" \
-scheme "${{ env.SCHEME }}" \
-configuration Debug \
-destination "platform=macOS" \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
| xcbeautify --renderer github-actions || true
test:
name: Test
runs-on: macos-26
needs: build
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Run tests
run: |
xcodebuild test \
-project "${{ env.APP_NAME }}.xcodeproj" \
-scheme "${{ env.SCHEME }}" \
-destination "platform=macOS" \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
| xcbeautify --renderer github-actions || true