Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 23 additions & 13 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: coverage
name: coverage-pages

on:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -16,24 +21,17 @@ jobs:
node-version: 20

- run: npm ci

- run: npx vitest run --coverage

- name: Generate simplified coverage badge JSON
run: |
mkdir -p public

pct=$(jq '.total.statements.pct' coverage/coverage-summary.json)

pct_int=$(printf "%.0f" $pct)

if (( pct_int < 60 )); then
color="red"
elif (( pct_int < 80 )); then
color="yellow"
else
color="brightgreen"
fi
if (( pct_int < 60 )); then color="red";
elif (( pct_int < 80 )); then color="yellow";
else color="brightgreen"; fi

echo "{
\"schemaVersion\": 1,
Expand All @@ -43,7 +41,19 @@ jobs:
}" > public/coverage.json

- name: Upload artifact for Pages
uses: actions/upload-artifact@v5
uses: actions/upload-pages-artifact@v4
with:
name: github-pages
path: public

deploy:
needs: build
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
24 changes: 0 additions & 24 deletions .github/workflows/pages.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
![publish](https://img.shields.io/github/actions/workflow/status/entiqon/datagrid/publish.yml?label=publish)
![release-drafter](https://img.shields.io/github/actions/workflow/status/entiqon/datagrid/release-drafter.yml?label=release-drafter)
![Tests](https://github.com/entiqon/datagrid/actions/workflows/test.yml/badge.svg)
![CI](https://github.com/entiqon/datagrid/actions/workflows/coverage.yml/badge.svg)
![Coverage](https://img.shields.io/endpoint?url=https://entiqon.github.io/datagrid/coverage.json)

A modern, typed, and extensible **DataGrid library for React**, built on:
Expand Down
Loading