Skip to content

add coverage report

add coverage report #6

Workflow file for this run

name: Built and Test
on:
pull_request:
paths:
- .github/**
- src/**
- "*.json"
- vite.config.ts
push:
branches:
- main
paths:
- .github/**
- src/**
- "*.json"
- vite.config.ts
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
services:
registry:
image: ghcr.io/project-zot/zot-minimal:v2.1.0
ports:
- 5000:5000
steps:
- name: Wait registry
run: |
for ((i=1; i<=30; i++)); do
status_code=$(curl -o /dev/null -s -w "%{http_code}\n" "http://localhost:5000/v2/" || true)
if [ "$status_code" -eq 200 ]; then
exit 0
fi
sleep 1
done
exit 1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm clean-install
- run: npx biome ci .
- run: npm run test-with-coverage
env:
REGISTRY_DOMAIN: localhost:5000
- run: npm run build
- name: Report Coverage
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage/lcov.info