diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fa93a9c..aca746c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,3 +22,8 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install - run: npm test + - run: npm run test:coverage + - name: codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index c11ba12e..cb8c73be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Coverage directory .nyc_output +coverage # Dependency directory node_modules diff --git a/.npmignore b/.npmignore index 0b4d8621..bfcd509c 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,6 @@ .github/ .nyc_output/ +coverage/ examples/ flow-typed/ tests/ diff --git a/README.md b/README.md index 456a90ad..87cc690d 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ Dotenv is a zero-dependency module that loads environment variables from a `.env [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![LICENSE](https://img.shields.io/github/license/motdotla/dotenv.svg)](LICENSE) +[![codecov](https://codecov.io/gh/motdotla/dotenv-expand/graph/badge.svg?token=pawWEyaMfg)](https://codecov.io/gh/motdotla/dotenv-expand) * [🌱 Install](#-install) * [🏗️ Usage (.env)](#%EF%B8%8F-usage) diff --git a/package.json b/package.json index 16397909..64c24404 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "lint-readme": "standard-markdown", "pretest": "npm run lint && npm run dts-check", "test": "tap tests/*.js --100 -Rspec", + "test:coverage": "tap --coverage-report=lcov", "prerelease": "npm test", "release": "standard-version" },