Skip to content

Commit

Permalink
ci: add version to code coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Berg committed Feb 15, 2024
1 parent 2246ad8 commit 5e6bfdd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run build
- run: npm run test

- name: Get npm version
id: get-values
shell: bash
run: |
VERSION=$(node -p 't=require(`./package.json`).version')
echo "Generating badge version $VERSION >> $GITHUB_OUTPUT"
- name: Update Coverage Badge
uses: we-cli/coverage-badge-action@main
uses: markusberg/coverage-badge-action@main
with:
version: '-${{ steps.get-values.outputs.version }}'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ltpa

[![node.js build](https://github.com/markusberg/ltpa/actions/workflows/master.yaml/badge.svg)](https://github.com/markusberg/ltpa/actions/workflows/master.yaml)
[![coverage](https://markusberg.github.io/ltpa/badges/coverage.svg)](https://github.com/markusberg/ltpa/actions)
[![coverage](https://markusberg.github.io/ltpa/badges/coverage-2.0.0-alpha.1.svg)](https://github.com/markusberg/ltpa/actions)
[![version](https://img.shields.io/npm/v/ltpa.svg)](https://codecov.io/github/markusberg/ltpa)
[![license](https://img.shields.io/github/license/markusberg/ltpa.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Expand Down

0 comments on commit 5e6bfdd

Please sign in to comment.