Skip to content

Commit fb70469

Browse files
author
Joe Newton
committed
Updated Swift Package GitHub Action to only upload code coverage from builds against the main branch
1 parent 48a548a commit fb70469

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/swift-pacakge.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ jobs:
2929
swift test -v --enable-code-coverage
3030
3131
- name: Generate Code Coverage File
32+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
3233
run: |
3334
xcrun llvm-cov export --instr-profile=.build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/ProtocolProxyPackageTests.xctest/Contents/MacOS/ProtocolProxyPackageTests > ./info.lcov
3435
3536
- name: Upload Code Coverage
37+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
3638
uses: codecov/codecov-action@v1
3739
with:
3840
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)