-
Notifications
You must be signed in to change notification settings - Fork 37
67 lines (57 loc) · 1.64 KB
/
test.yml
File metadata and controls
67 lines (57 loc) · 1.64 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
name: Test Suite
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
name: Run Tests
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Cache DerivedData
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-deriveddata-${{ hashFiles('Recap.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-deriveddata-
- name: Resolve Package Dependencies
run: |
xcodebuild -resolvePackageDependencies \
-project Recap.xcodeproj \
-scheme Recap
- name: Build and Test
run: |
xcodebuild test \
-project Recap.xcodeproj \
-scheme Recap \
-destination 'platform=macOS' \
-resultBundlePath TestResults.xcresult \
-enableCodeCoverage YES \
-only-testing:RecapTests \
-skipMacroValidation \
CODE_SIGNING_ALLOWED=NO
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: TestResults.xcresult
- name: Generate Coverage Report
run: |
xcrun xccov view --report --json TestResults.xcresult > coverage.json
- name: Upload Coverage
uses: codecov/codecov-action@v5
with:
file: coverage.json
flags: unittests
name: recap-coverage
fail_ci_if_error: false