From 99f07cb05be575ff7c1304e0ba365732f9eea4bf Mon Sep 17 00:00:00 2001 From: MacOMNI <414294494@qq.com> Date: Sun, 10 Nov 2024 08:50:33 +0800 Subject: [PATCH] update test --- .github/workflows/coverage.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 611d4832..cfb4e6c6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -69,13 +69,19 @@ jobs: - name: Build deps run: make deps - name: Test Coverage - run: make test-coverage + run: | + SWIFTFLAGS="-Xfrontend -enable-experimental-feature -Xfrontend ExtendedLifeTimeCoverageInstrumentation" \ + swift test --enable-code-coverage + llvm-profdata merge -sparse .build/debug/codecov/*.profraw -o coverage.profdata + llvm-cov export -format=lcov .build/debug/ -instr-profile=coverage.profdata > coverage.lcov - name: List Coverage Files run: | echo "Checking coverage files..." - find . -name "*.lcov" -o -name "*.json" -o -name "*.xml" + find . -name "*.lcov" -o -name "*.xml" + - uses: codecov/codecov-action@v4 with: - fail_ci_if_error: true # optional (default = false) - token: ${{ secrets.CODECOV_TOKEN }} # required - verbose: true # optional (default = false) + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + path: "./coverage.lcov"