-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (83 loc) · 2.42 KB
/
testCoveralls.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Test Coveralls
on:
- push
- pull_request
jobs:
build_backend:
name: Build Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install backend dependencies
run: |
cd Backend
npm install
npm install --save-dev babel-plugin-istanbul
npm install -g coveralls
- name: Run backend tests with coverage
run: |
cd Backend
npm run test:cov
- name: Upload backend coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: Backend/coverage/lcov.info
build_frontend:
name: Build Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install frontend dependencies
run: |
cd Frontend
npm install
npm install --save-dev babel-plugin-istanbul
npm install -g coveralls
- name: Run frontend tests with coverage
run: |
cd Frontend
npm run test:coverage
- name: Upload frontend coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: Frontend/coverage/lcov.info
debug:
name: Debug Workspace
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Debug Backend Workspace
run: |
echo "Listing files in Backend directory:"
ls -la Backend
echo "Displaying package.json in Backend directory:"
cat Backend/package.json
- name: Debug Frontend Workspace
run: |
echo "Listing files in Frontend directory:"
ls -la Frontend
echo "Displaying package.json in Frontend directory:"
cat Frontend/package.json
upload_results:
name: Upload Test Results
if: failure()
runs-on: ubuntu-latest
steps:
- uses: actions/upload-artifact@v2
with:
name: backend-test-results
path: Backend/coverage
- uses: actions/upload-artifact@v2
with:
name: frontend-test-results
path: Frontend/coverage