-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
76 lines (62 loc) · 1.92 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
name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: Show Xcode version
run: xcodebuild -version
- name: List available simulators
run: xcrun simctl list devices available
- name: Build
run: |
xcodebuild build \
-project "Stay Tuned/Stay Tuned.xcodeproj" \
-scheme "Stay Tuned" \
-destination "platform=iOS Simulator,name=iPhone 16" \
-configuration Debug \
CODE_SIGNING_ALLOWED=NO \
| xcpretty --color
- name: Run Unit Tests
run: |
xcodebuild test \
-project "Stay Tuned/Stay Tuned.xcodeproj" \
-scheme "Stay Tuned" \
-destination "platform=iOS Simulator,name=iPhone 16" \
-configuration Debug \
CODE_SIGNING_ALLOWED=NO \
-resultBundlePath TestResults.xcresult \
| xcpretty --color --report junit --output test-results.xml
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
test-results.xml
TestResults.xcresult
if-no-files-found: ignore
retention-days: 30
lint:
name: Swift Lint
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint lint --config .swiftlint.yml --reporter github-actions-logging