From 6bd5dfd1897ccd77ee16d1a93d0775b1902425e6 Mon Sep 17 00:00:00 2001 From: Tronin Denis Date: Wed, 10 Aug 2022 11:54:00 +0300 Subject: [PATCH] add codecov --- .github/workflows/coverage.yml | 43 +++++++++++++++---------------- .github/workflows/npm-publish.yml | 2 +- README.md | 2 ++ 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 268f32a..4694f66 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -4,7 +4,6 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest strategy: @@ -12,24 +11,24 @@ jobs: node-version: [16.x] steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm install - - - name: Run the tests - run: npm test -- --coverage - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Run the tests + run: npm test -- --coverage + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 761aeab..10f4ac6 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -28,4 +28,4 @@ jobs: - run: npm run build - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/README.md b/README.md index 6ddd772..1662bf9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![codecov](https://codecov.io/gh/ts-ign0re/jim-wendler-program/branch/main/graph/badge.svg?token=R7681VR5YP)](https://codecov.io/gh/ts-ign0re/jim-wendler-program) + # Inspiration This package is inspired by the Jim Wendler training program. Unfortunately I couldn't find a solution and wrote my own version.