-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.06 KB
/
swift.yml
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
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: macos-15
steps:
- name: 🛒 Checkout Code
uses: actions/checkout@v3
- name: 📦 Set Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.1'
- name: 🛠️ Build and Test with Code Coverage
run: |
swift test --enable-code-coverage
- name: ✍️ Generate Coverage Report
run: |
xcrun llvm-cov export -format="lcov" .build/debug/FusionKitPackageTests.xctest/Contents/MacOS/FusionKitPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: ✅ Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: info.lcov
fail_ci_if_error: true