aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/codecov.yaml
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2024-04-17 14:57:54 -0600
committerNavan Chauhan <navanchauhan@gmail.com>2024-04-17 14:57:54 -0600
commitf8a407b33f6ce39780f1e17e7156ac4b5dde0a69 (patch)
tree6a6439ef70e66af9dc19c14266be763e26544bc7 /.github/workflows/codecov.yaml
parentd536546da3c980c315b7ded7361e4925f9e587c4 (diff)
add github workflow codecov
Diffstat (limited to '.github/workflows/codecov.yaml')
-rw-r--r--.github/workflows/codecov.yaml23
1 files changed, 23 insertions, 0 deletions
diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml
new file mode 100644
index 0000000..27f2c8b
--- /dev/null
+++ b/.github/workflows/codecov.yaml
@@ -0,0 +1,23 @@
+name: Code Coverage
+on: [push]
+
+jobs:
+ Test-CodeCov:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@master
+ - uses: swift-actions/setup-swift@v2
+ with:
+ swift-version: "5.9"
+ - name: Run Tests
+ run: swift test --enable-code-coverage
+ - name: Convert to lcov
+ run: llvm-cov export -format="lcov" .build/debug/swift-chess-neoPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > info.lcov
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v4
+ with:
+ fail_ci_if_error: true
+ verbose: true
+ token: ${{ secrets.CODECOV_TOKEN }}
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}