Skip to content

Commit

Permalink
Merge pull request #160 from fingerprintjs/feat/update-coverage-repor…
Browse files Browse the repository at this point in the history
…t-workflow

Update coverage report workflow
  • Loading branch information
ilfa authored Dec 11, 2023
2 parents c488788 + 6801f57 commit 8e5d880
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 51 deletions.
45 changes: 7 additions & 38 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,10 @@ on:
- main

jobs:
build-and-run-tests:
runs-on: ubuntu-20.04
name: Build & run tests & publish coverage
steps:
- uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies and prepare packages
run: yarn install
env:
CI: true
- name: Run test
run: yarn test:coverage

- name: Create Coverage Badges
uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620
with:
source: coverage/coverage-summary.json
output: coverage/lcov-report/badges.svg

- name: Deploy
uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc
with:
branch: gh-pages
folder: ./coverage/lcov-report/
generate-docs-and-coverage:
name: Generate docs and coverage report
uses: fingerprintjs/dx-team-toolkit/.github/workflows/docs-and-coverage.yml@v1
with:
skip-docs-step: true
prepare-gh-pages-commands: |
mv coverage/lcov-report/* ./gh-pages/
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,11 @@
</picture>
</a>
<p align="center">
<a href="https://github.com/fingerprintjs/fingerprint-pro-cloudfront-integration">
<img src="https://img.shields.io/github/v/release/fingerprintjs/fingerprint-pro-cloudfront-integration" alt="Current version">
</a>
<a href="https://fingerprintjs.github.io/fingerprint-pro-cloudfront-integration">
<img src="https://fingerprintjs.github.io/fingerprint-pro-cloudfront-integration/badges.svg" alt="coverage">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/:license-mit-blue.svg" alt="MIT license">
</a>
<a href="https://discord.gg/39EpE2neBg">
<img src="https://img.shields.io/discord/852099967190433792?style=logo&label=Discord&logo=Discord&logoColor=white" alt="Discord server">
</a>
<a href="https://github.com/fingerprintjs/fingerprint-pro-cloudfront-integration"><img src="https://img.shields.io/github/v/release/fingerprintjs/fingerprint-pro-cloudfront-integration" alt="Current version"></a>
<a href="https://fingerprintjs.github.io/fingerprint-pro-cloudfront-integration"><img src="https://fingerprintjs.github.io/fingerprint-pro-cloudfront-integration/badges.svg" alt="coverage"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/:license-mit-blue.svg" alt="MIT license"></a>
<a href="https://discord.gg/39EpE2neBg"><img src="https://img.shields.io/discord/852099967190433792?style=logo&label=Discord&logo=Discord&logoColor=white" alt="Discord server"></a>
</p>

# Fingerprint Pro CloudFront Integration

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = {
testEnvironment: 'node',
testRegex: '/test/.+test.tsx?$',
passWithNoTests: true,
collectCoverageFrom: ['./src/**/**.ts', '!**/handlers/**.ts', '!**/model/**.ts', '!./src/app.ts', '!**/index.ts'],
collectCoverageFrom: ['./proxy/**/**.ts', '!**/handlers/**.ts', '!**/model/**.ts', '!./proxy/app.ts', '!**/index.ts'],
coverageReporters: ['lcov', 'json-summary', ['text', { file: 'coverage.txt', path: './' }]],
}

0 comments on commit 8e5d880

Please sign in to comment.