From 58d441ffb353ad6f54ecebdfa9ba1d02ab9f0d6a Mon Sep 17 00:00:00 2001 From: Luis Eduardo Date: Tue, 9 Jul 2024 13:12:48 -0500 Subject: [PATCH] feat: Add Codecov workflow for test coverage reporting --- .github/workflows/codecov.yml | 16 ++++++++++++++ .github/workflows/npm-publish.yml | 35 ------------------------------- 2 files changed, 16 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/codecov.yml delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..8484052 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,16 @@ +name: Workflow for Codecov +on: [push, pull_request] +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index ac69746..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -'on': - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - run: npm ci - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}