-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.6 KB
/
coverage.yml
File metadata and controls
60 lines (50 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
continue-on-error: true
- name: Clean up coverage files
run: rm -rf coverage/