From a83bcf98698524ecc4a3be7b2591ca7dfa286584 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 20 Oct 2021 12:06:44 +0200 Subject: [PATCH] Added codecov.io coverage uploader to CI refs linear.app/tryghost/issue/CORE-74/improve-the-test-situation - this commit adds the codecov GitHub Action into CI so we can upload coverage reports - the coverage files need to be in XML for them to work with codecov, so this commit also adds cobertura (XML) as a reporter --- ghost/portal/.github/workflows/test.yml | 4 +++- ghost/portal/package.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ghost/portal/.github/workflows/test.yml b/ghost/portal/.github/workflows/test.yml index 4d9eaf908f..2b2267f7b7 100644 --- a/ghost/portal/.github/workflows/test.yml +++ b/ghost/portal/.github/workflows/test.yml @@ -22,7 +22,9 @@ jobs: node-version: ${{ matrix.node }} - run: yarn install - run: yarn build - - run: yarn test + - run: yarn test:ci + + - uses: codecov/codecov-action@v2 - uses: daniellockyer/action-slack-build@master if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' diff --git a/ghost/portal/package.json b/ghost/portal/package.json index 8888bba1ed..f89404df93 100644 --- a/ghost/portal/package.json +++ b/ghost/portal/package.json @@ -69,6 +69,7 @@ }, "jest": { "coverageReporters": [ + "cobertura", "text-summary", "html" ]