Skip to content

Commit

Permalink
chore: add UploadCoverageReport.yml (TheAlgorithms#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 authored Jan 27, 2024
1 parent 0e5cf5e commit 1d63400
Show file tree
Hide file tree
Showing 5 changed files with 901 additions and 1,467 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/UploadCoverageReport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: UploadCoverageReport

'on':
workflow_dispatch:
push:
branches:
- master
pull_request:

jobs:
UploadCoverageReport:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Generate coverage report
run: npm test -- --coverage

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
files: "coverage/coverage-final.json"
fail_ci_if_error: true
...
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ yarn-error.log*

# intelliJ workspace folder
.idea

/coverage
Loading

0 comments on commit 1d63400

Please sign in to comment.