Skip to content

Add AI Metadata Display Component with Tests and Documentation #15

Add AI Metadata Display Component with Tests and Documentation

Add AI Metadata Display Component with Tests and Documentation #15

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:ci
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage/
if-no-files-found: error
- name: Check test coverage
run: |
if [ "$(jq -r '.total.lines.pct' coverage/coverage-summary.json)" -lt 80 ]; then
echo "Test coverage is below 80%"
exit 1
fi