From 692fc6fed7612aad5ebc279eef065478d28b89b8 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Mon, 1 Mar 2021 07:06:41 +0800 Subject: [PATCH] build: collect and upload code coverage (#770) Co-authored-by: Luca Casonato --- .github/codecov.yml | 3 +++ .github/workflows/ci.yml | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000000..060eb6073533 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,3 @@ +comment: false +codecov: + require_ci_to_pass: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ff9695365d7..ee5f9e36d70f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,8 +39,19 @@ jobs: if: matrix.deno == 'canary' run: deno upgrade --canary - - name: Test - run: deno test --unstable --allow-all + - name: Run tests + run: deno test --coverage=./cov --unstable --allow-all + + - name: Generate lcov + if: matrix.deno == 'canary' + run: deno coverage --unstable --lcov ./cov > cov.lcov + + - name: Upload coverage + if: matrix.deno == 'canary' + uses: codecov/codecov-action@v1 + with: + name: ${{ matrix.os }}-${{ matrix.deno }} + files: cov.lcov lint: runs-on: ubuntu-latest