Skip to content

Commit

Permalink
chore: coverage badge and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirvolek committed Nov 30, 2022
1 parent db4cd6b commit 4b5dae7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: blockfrost-js
name: blockfrost-js-CIcko

on: [push]

Expand All @@ -17,7 +17,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn run lint
- run: yarn run type-check
- run: PROJECT_ID=${{ secrets.PROJECT_ID }} PROJECT_ID_IPFS=${{ secrets.PROJECT_ID_IPFS }} yarn run test
- run: yarn run build
- run: yarn lint
- run: yarn type-check
- run: yarn test
- run: yarn build
- run: yarn coverage-ci
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![master build ci](https://github.com/blockfrost/blockfrost-js/actions/workflows/build.yml/badge.svg?branch=master) [![npm version](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-js.svg)](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-js) ![downloads](https://img.shields.io/npm/dy/@blockfrost/blockfrost-js) <img src="https://github.com/blockfrost/blockfrost-js/blob/master/packages/blockfrost-js/docs/badge-coverage.svg" /> <a href="https://fivebinaries.com/"><img src="https://img.shields.io/badge/made%20by-Five%20Binaries-darkviolet.svg?style=flat-square" /></a>
![master build ci](https://github.com/blockfrost/blockfrost-js/actions/workflows/build.yml/badge.svg?branch=master) [![npm version](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-js.svg)](https://badge.fury.io/js/%40blockfrost%2Fblockfrost-js) ![downloads](https://img.shields.io/npm/dy/@blockfrost/blockfrost-js) <img src="https://github.com/blockfrost/blockfrost-js/blob/master/packages/blockfrost-js/coverage-badge.svg" /> <a href="https://fivebinaries.com/"><img src="https://img.shields.io/badge/made%20by-Five%20Binaries-darkviolet.svg?style=flat-square" /></a>

<img src="https://blockfrost.io/images/logo.svg" width="250" align="right" height="90">

Expand Down
2 changes: 1 addition & 1 deletion docs/badge-coverage.svg → coverage-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
"docs": "yarn typedoc ./src/index.ts --theme ./node_modules/typedoc-github-wiki-theme/dist",
"lint": "eslint ./src/**/*.ts",
"prepublishOnly": "yarn build",
"test": "vitest",
"test": "vitest --silent",
"type-check": "tsc --project ./tsconfig.types.json",
"coverage": "vitest run --coverage"
"make-badge": "make-coverage-badge --output-path='./coverage-badge.svg'",
"coverage": "vitest run --coverage --silent && make-badge",
"coverage-ci": "vitest run --coverage --silent"
},
"dependencies": {
"@blockfrost/blockfrost-utils": "2.0.0",
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineConfig({
testTimeout: 5000,
mockReset: true,
coverage: {
reporter: ['json-summary'],
include: ['src'],
},
include: ['./test/tests/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
Expand Down

0 comments on commit 4b5dae7

Please sign in to comment.