Skip to content

Commit 729338b

Browse files
Update workflows
1 parent 1937ff3 commit 729338b

4 files changed

Lines changed: 30 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10-
env:
11-
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
12-
1310
jobs:
1411
lint:
1512
name: SwiftLint
@@ -146,9 +143,7 @@ jobs:
146143
xcode-version: '16.0'
147144

148145
- name: Build to Generate Mocks
149-
run: |
150-
cd Recap
151-
swift build
146+
run: swift build
152147

153148
- name: Check for Uncommitted Mock Changes
154149
run: |

.github/workflows/pr-tests.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
711
jobs:
8-
test-matrix:
9-
name: Test on macOS ${{ matrix.macos }}
10-
runs-on: ${{ matrix.macos }}
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
macos: [macos-14, macos-15]
15-
xcode: ['15.4', '16.0']
16-
exclude:
17-
- macos: macos-14
18-
xcode: '16.0'
12+
test:
13+
name: Test PR
14+
runs-on: macos-latest
1915

2016
steps:
2117
- name: Checkout code
@@ -24,37 +20,39 @@ jobs:
2420
- name: Setup Xcode
2521
uses: maxim-lobanov/setup-xcode@v1
2622
with:
27-
xcode-version: ${{ matrix.xcode }}
23+
xcode-version: latest-stable
2824

2925
- name: Cache Dependencies
3026
uses: actions/cache@v4
3127
with:
3228
path: |
3329
~/Library/Developer/Xcode/DerivedData
3430
.build
35-
key: ${{ runner.os }}-${{ matrix.macos }}-spm-${{ hashFiles('**/Package.resolved') }}
31+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
32+
restore-keys: |
33+
${{ runner.os }}-spm-
3634
3735
- name: Build and Test
38-
run: |
39-
cd Recap
40-
swift test --parallel
36+
run: swift test --parallel
4137

4238
- name: Comment PR on Failure
43-
if: failure()
39+
if: failure() && github.event_name == 'pull_request'
4440
uses: actions/github-script@v7
4541
with:
42+
github-token: ${{secrets.GITHUB_TOKEN}}
4643
script: |
4744
github.rest.issues.createComment({
4845
issue_number: context.issue.number,
4946
owner: context.repo.owner,
5047
repo: context.repo.repo,
51-
body: '❌ Tests failed on ${{ matrix.macos }} with Xcode ${{ matrix.xcode }}. Please check the workflow logs.'
48+
body: '❌ Tests failed. Please check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).'
5249
})
5350
5451
- name: Comment PR on Success
55-
if: success() && matrix.macos == 'macos-15' && matrix.xcode == '16.0'
52+
if: success() && github.event_name == 'pull_request'
5653
uses: actions/github-script@v7
5754
with:
55+
github-token: ${{secrets.GITHUB_TOKEN}}
5856
script: |
5957
github.rest.issues.createComment({
6058
issue_number: context.issue.number,

.github/workflows/test.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
test:
1212
name: Run Tests
13-
runs-on: macos-15
13+
runs-on: macos-latest
1414

1515
steps:
1616
- name: Checkout code
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Xcode
2020
uses: maxim-lobanov/setup-xcode@v1
2121
with:
22-
xcode-version: '16.0'
22+
xcode-version: latest-stable
2323

2424
- name: Cache Swift Package Manager
2525
uses: actions/cache@v4
@@ -32,38 +32,32 @@ jobs:
3232
${{ runner.os }}-spm-
3333
3434
- name: Resolve Dependencies
35-
run: |
36-
cd Recap
37-
swift package resolve
35+
run: swift package resolve
3836

3937
- name: Build for Testing
40-
run: |
41-
cd Recap
42-
swift build --build-tests
38+
run: swift build --build-tests
4339

4440
- name: Run Tests
45-
run: |
46-
cd Recap
47-
swift test --parallel --xunit-output=test-results.xml
41+
run: swift test --parallel --xunit-output=test-results.xml
4842

4943
- name: Upload Test Results
5044
uses: actions/upload-artifact@v4
5145
if: always()
5246
with:
5347
name: test-results
54-
path: Recap/test-results.xml
48+
path: test-results.xml
5549

5650
- name: Publish Test Report
5751
uses: mikepenz/action-junit-report@v4
5852
if: always()
5953
with:
60-
report_paths: 'Recap/test-results.xml'
54+
report_paths: 'test-results.xml'
6155
check_name: 'Test Results'
6256
fail_on_failure: true
6357

6458
code-coverage:
6559
name: Code Coverage
66-
runs-on: macos-15
60+
runs-on: macos-latest
6761

6862
steps:
6963
- name: Checkout code
@@ -72,16 +66,13 @@ jobs:
7266
- name: Setup Xcode
7367
uses: maxim-lobanov/setup-xcode@v1
7468
with:
75-
xcode-version: '16.0'
69+
xcode-version: latest-stable
7670

7771
- name: Generate Coverage Report
78-
run: |
79-
cd Recap
80-
swift test --enable-code-coverage
72+
run: swift test --enable-code-coverage
8173

8274
- name: Convert Coverage to LCOV
8375
run: |
84-
cd Recap
8576
xcrun llvm-cov export \
8677
.build/debug/RecapPackageTests.xctest/Contents/MacOS/RecapPackageTests \
8778
-instr-profile .build/debug/codecov/default.profdata \
@@ -92,7 +83,7 @@ jobs:
9283
- name: Upload Coverage to Codecov
9384
uses: codecov/codecov-action@v5
9485
with:
95-
file: ./Recap/coverage.lcov
86+
file: ./coverage.lcov
9687
flags: unittests
9788
name: recap-coverage
9889
fail_ci_if_error: false

Recap/Services/MeetingDetection/Core/MeetingDetectionService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ final class MeetingDetectionService: MeetingDetectionServiceType {
6363
}
6464

6565
func stopMonitoring() {
66-
isMonitoring = false
6766
monitoringTask?.cancel()
67+
isMonitoring = false
6868
monitoringTask = nil
6969
isMeetingActive = false
7070
activeMeetingInfo = nil

0 commit comments

Comments
 (0)