LoGin 11 mesiacov pred
rodič
commit
86f923e00a
2 zmenil súbory, kde vykonal 23 pridanie a 4 odobranie
  1. 7 0
      .github/codecov.yml
  2. 16 4
      .github/workflows/rust.yml

+ 7 - 0
.github/codecov.yml

@@ -0,0 +1,7 @@
+comment:                  # this is a top-level key
+  layout: " diff, flags, files"
+  behavior: default
+  require_changes: false  # if true: only post the comment if coverage changes
+  require_base: false        # [true :: must have a base report to post]
+  require_head: true       # [true :: must have a head report to post]
+  hide_project_coverage: false # [true :: only show coverage on the git diff]

+ 16 - 4
.github/workflows/rust.yml

@@ -31,8 +31,20 @@ jobs:
 
   test:
     runs-on: ubuntu-latest
+    env:
+      CARGO_TERM_COLOR: always
     steps:
-    - uses: actions/checkout@v3
-
-    - name: Run tests
-      run: cargo test
+      - uses: actions/checkout@v4
+      - name: Install Rust
+        run: rustup update stable
+      - name: Install cargo-llvm-cov
+        uses: taiki-e/install-action@cargo-llvm-cov
+      - name: Generate code coverage
+        run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
+      - name: Upload coverage to Codecov
+        uses: codecov/codecov-action@v4.0.1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
+          files: lcov.info
+          fail_ci_if_error: true
+