Prechádzať zdrojové kódy

chore: add code coverage support

Dirkjan Ochtman 6 rokov pred
rodič
commit
501481d90a
2 zmenil súbory, kde vykonal 26 pridanie a 0 odobranie
  1. 25 0
      .github/workflows/codecov.yml
  2. 1 0
      README.md

+ 25 - 0
.github/workflows/codecov.yml

@@ -0,0 +1,25 @@
+name: Coverage
+
+on:
+  push:
+    branches: ['master']
+  pull_request:
+
+jobs:
+  coverage:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v1
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: minimal
+          toolchain: stable
+          override: true
+      - uses: actions-rs/tarpaulin@v0.1
+      - uses: codecov/codecov-action@v1.0.2
+        with:
+          token: ${{secrets.CODECOV_TOKEN}}
+      - uses: actions/upload-artifact@v1
+        with:
+          name: code-coverage-report
+          path: cobertura.xml

+ 1 - 0
README.md

@@ -2,6 +2,7 @@ rust-url
 ========
 
 [![Build status](https://github.com/servo/rust-url/workflows/CI/badge.svg)](https://github.com/servo/rust-url/actions?query=workflow%3ACI)
+[![Coverage](https://codecov.io/gh/servo/rust-url/branch/master/graph/badge.svg)](https://codecov.io/gh/servo/rust-url)
 [![Chat](https://img.shields.io/badge/chat-%23rust--url:mozilla.org-%2346BC99?logo=Matrix)](https://matrix.to/#/#rust-url:mozilla.org)
 [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE-MIT)
 [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE-APACHE)