Skip to content

Commit 74d0ac8

Browse files
Add GitHub Actions workflow for Swift project testing
1 parent 614b94e commit 74d0ac8

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a Swift project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3+
4+
name: XcodeTargets Unit Tests
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: macos-14
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: SwiftyLab/setup-swift@latest
20+
- name: Build
21+
run: swift build
22+
- name: Run tests
23+
run: swift test --enable-code-coverage
24+
- name: Install llvm-cov plugin
25+
run: brew install llvm
26+
- name: Generate coverage report
27+
run: llvm-cov export -format="lcov" .build/debug/XcodeTargetsPackageTests.xctest/Contents/MacOS/XcodeTargetsPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
28+
- name: Upload coverage reports to Codecov
29+
uses: codecov/codecov-action@v5
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}
32+
slug: michaelversus/XcodeTargets

0 commit comments

Comments
 (0)