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 16, 2024
1 parent 2246ad8 commit 35a5f27
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 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 "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-beta.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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ltpa",
"version": "2.0.0-alpha.1",
"version": "2.0.0-beta.1",
"description": "Ltpa token generation and validation",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"strict": true,
"rootDir": "src"
},
"include": ["src/**/*.ts"],
"exclude": ["**/*.test.ts"]
}

0 comments on commit 35a5f27

Please sign in to comment.