Skip to content

Commit

Permalink
refactor(test): refatora codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelo-lourenco committed Oct 7, 2024
1 parent 8a59f7d commit a449c36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -25,13 +25,14 @@ jobs:
cache: 'npm'

- name: Run tests with coverage
run: node --test --experimental-test-coverage test
run: npm ci
run: npm run coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/*.json # Ou qualquer caminho que contenha o relatório de cobertura
files: ./coverage/lcov.info # Ou qualquer caminho que contenha o relatório de cobertura
flags: unittests # Flag opcional para diferenciar tipos de testes
name: codecov-coverage
fail_ci_if_error: true
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NPM version][npm-version-img]][npm-url] [![NPM downloads][npm-downloads-img]][npm-downloads-url] [![MIT License][license-img]][license-url]
[![CodeQL][git-codeql-img]][git-codeql-url] [![CI Test][git-citest-img]][git-citest-url] [![ESLint][git-eslint-img]][git-eslint-url]
[![codecov][codecov-img]][codecov-url] [![FOSSA Licence][fossa-license-img]][fossa-url] [![FOSSA Security][fossa-security-img]][fossa-url]
[![Coverage][coverage-img]][coverage-url] [![FOSSA Licence][fossa-license-img]][fossa-url] [![FOSSA Security][fossa-security-img]][fossa-url]

[license-img]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: LICENSE
Expand All @@ -22,8 +22,8 @@
[git-eslint-img]: https://github.com/marcelo-lourenco/gerador-br/actions/workflows/eslint.yml/badge.svg
[git-eslint-url]: https://github.com/marcelo-lourenco/gerador-br/actions/workflows/eslint.yml

[codecov-img]: https://codecov.io/github/marcelo-lourenco/gerador-br/graph/badge.svg?token=JVAF4NO9IZ
[codecov-url]: https://codecov.io/github/marcelo-lourenco/gerador-br
[coverage-img]: https://coveralls.io/repos/github/marcelo-lourenco/gerador-br/badge.svg
[coverage-url]: https://coveralls.io/github/marcelo-lourenco/gerador-br

[fossa-license-img]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmarcelo-lourenco%2Fgerador-br.svg?type=shield&issueType=license
[fossa-security-img]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmarcelo-lourenco%2Fgerador-br.svg?type=shield&issueType=security
Expand Down

0 comments on commit a449c36

Please sign in to comment.