Skip to content

add tests for /services #103

add tests for /services

add tests for /services #103

Workflow file for this run

name: Coverage Report
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: npm run test:coverage
- name: List coverage files (debug)
run: |
echo "Coverage directory contents:"
ls -la coverage/ || echo "No coverage directory found"
echo "Looking for lcov.info:"
find . -name "*.lcov" -o -name "lcov.info" || echo "No lcov files found"
echo "Repository info:"
echo "Repository: ${{ github.repository }}"
echo "Commit SHA: ${{ github.sha }}"
echo "Branch: ${{ github.ref_name }}"
echo "Event: ${{ github.event_name }}"
- name: Verify Qlty token
run: |
if [ -z "${{ secrets.QLTY_COVERAGE_TOKEN }}" ]; then
echo "❌ QLTY_COVERAGE_TOKEN is not set"
exit 1
else
echo "✅ QLTY_COVERAGE_TOKEN is set (length: ${#QLTY_COVERAGE_TOKEN})"
fi
env:
QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }}
- name: Upload coverage to Qlty
uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: coverage/lcov.info
repository: ${{ github.repository }}
commit: ${{ github.sha }}
branch: ${{ github.ref_name }}
continue-on-error: true
- name: Clean up coverage files
run: rm -rf coverage/