Skip to content

1.49.0 (#1266)

1.49.0 (#1266) #454

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
jobs:
coverage:
name: Coverage Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '24.15.0'
- name: Install dependencies
run: npm ci --include=optional --ignore-scripts
- name: Run tests with coverage
run: npm run test:coverage
- name: Upload coverage artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: coverage-report
path: coverage/
update-coverage-badge:
name: Update Coverage Badge
runs-on: ubuntu-latest
needs: coverage
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '24.15.0'
- name: Install dependencies
run: npm ci --include=optional --ignore-scripts
- name: Download coverage artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: coverage-report
path: coverage/
- name: Extract coverage percentage
id: coverage
run: |
COVERAGE_JSON=$(npm exec tsx scripts/extract-coverage.ts --coverage-dir coverage)
COVERAGE=$(echo "$COVERAGE_JSON" | node -pe "JSON.parse(require('fs').readFileSync(0, 'utf-8')).lines.pct.toFixed(2)")
echo "coverage=$COVERAGE" >> $GITHUB_OUTPUT
echo "Coverage: $COVERAGE%"
- name: Create coverage badge
uses: schneegans/dynamic-badges-action@28b0fa8bdeb46170ac397105ece0c1fe58f68910 # v1.9.0
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: ${{ secrets.COVERAGE_GIST_ID }}
filename: remote-flows-coverage.json
label: coverage
message: ${{ steps.coverage.outputs.coverage }}%
color: ${{ steps.coverage.outputs.coverage > 80 && 'green' || steps.coverage.outputs.coverage > 60 && 'yellow' || 'red' }}