-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.83 KB
/
ci.yml
File metadata and controls
70 lines (59 loc) · 1.83 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
61
62
63
64
65
66
67
68
69
70
name: Tests & Coverage
on:
pull_request:
branches: [ master, main, develop ]
jobs:
tests:
name: Run Tests & Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.25'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
go mod download
cd frontend && npm ci
- name: Run Go tests with coverage
run: go test ./... -v -coverprofile=coverage.out -covermode=atomic
- name: Debug test files
working-directory: ./frontend
run: |
echo "=== Checking test files ==="
find tests -name "*.spec.ts" -o -name "*.spec.tsx" | head -20
echo "=== Checking vitest config ==="
cat vitest.config.ts
echo "=== Checking package.json test scripts ==="
grep -A5 -B5 "test:" package.json
- name: Run frontend tests with coverage
working-directory: ./frontend
run: |
export NODE_OPTIONS="--max-old-space-size=4096 --no-warnings"
npm run test:coverage
env:
NODE_ENV: test
VITEST_MAX_THREADS: 1
VITEST_MIN_THREADS: 1
CI: true
- name: Upload Go coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
flags: backend
fail_ci_if_error: false
verbose: true
- name: Upload frontend coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./frontend/coverage
flags: frontend
fail_ci_if_error: false
verbose: true