Skip to content

Commit cef14a3

Browse files
committed
chore(ci): add codecov config and GitHub build workflow
Add codecov.yml for coverage reporting with targets and exclusions. Create GitHub Actions workflow to build, test, and verify Swift 6.2.0 on macOS.
1 parent 4dc0129 commit cef14a3

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Test
2+
3+
# Swift 6.2 Required
4+
# Uses swift-actions/setup-swift to install Swift 6.2.0 regardless of runner's default version
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
name: Build and Test
15+
runs-on: macos-26
16+
17+
permissions:
18+
contents: read
19+
packages: read
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Swift 6.2
26+
uses: SwiftyLab/setup-swift@latest
27+
with:
28+
swift-version: "6.2.0"
29+
30+
- name: Get Swift version
31+
run: swift --version
32+
33+
- name: Resolve dependencies
34+
run: swift package resolve
35+
36+
- name: Build
37+
run: swift build
38+
39+
- name: Run tests
40+
run: swift test --parallel
41+
42+
- name: Build for release
43+
run: swift build -c release

codecov.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 80%
6+
threshold: 2%
7+
patch:
8+
default:
9+
target: 70%
10+
11+
comment:
12+
layout: "reach,diff,flags,tree"
13+
behavior: default
14+
require_changes: false
15+
16+
ignore:
17+
- "**/*Preview*.swift" # SwiftUI previews
18+
- "**/TestHelpers/**/*"

0 commit comments

Comments
 (0)