Skip to content

Commit 8b24b5e

Browse files
committed
coverage improvement on codecov
1 parent cf47685 commit 8b24b5e

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

.github/workflows/rpe_test.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ jobs:
3333
if: ${{ matrix.os != 'ubuntu-22.04' }}
3434
uses: actions/setup-node@v4
3535
with:
36-
node-version: 20.11 # if update this then also update in Dockerfile for centos
36+
node-version: 20.11 #if update this then also update in Dockerfile for centos
3737

3838
- name: Setup Python
39-
uses: actions/setup-python@v5
39+
if: ${{ matrix.os != 'ubuntu-22.04' }}
40+
uses: actions/[email protected]
4041
with:
41-
python-version: 3.8 # if update this then also update in Dockerfile for centos
42+
python-version: 3.8 #if update this then also update in Dockerfile for centos
4243

4344
- name: Login to the Container registry
4445
if: ${{ matrix.os == 'ubuntu-22.04' }}
@@ -58,13 +59,13 @@ jobs:
5859
node --version
5960
python3 -V
6061
61-
- name: Shell configuration on CentOS 7
62+
- name: Shell configuration on centos 7
6263
if: ${{ matrix.os == 'ubuntu-22.04' }}
6364
uses: addnab/docker-run-action@v3
6465
with:
6566
shell: bash
6667
image: ghcr.io/${{ github.repository_owner }}/rapid_power_estimator:centos7latest
67-
run: |
68+
run:
6869
source /opt/rh/devtoolset-11/enable
6970
cmake --version
7071
node --version
@@ -81,7 +82,7 @@ jobs:
8182
run: |
8283
npx eslint src/
8384
84-
- name: Install packages CentOS 7 & Run pytest & frontend test
85+
- name: Install packages centos 7 & Run pytest & frontend test
8586
if: ${{ matrix.os == 'ubuntu-22.04' }}
8687
uses: addnab/docker-run-action@v3
8788
with:
@@ -127,12 +128,13 @@ jobs:
127128
if: ${{ matrix.os != 'ubuntu-22.04' }}
128129
uses: actions/setup-node@v4
129130
with:
130-
node-version: 20.11 # if update this then also update in Dockerfile for centos
131+
node-version: 20.11 #if update this then also update in Dockerfile for centos
131132

132133
- name: Setup Python
133-
uses: actions/setup-python@v5
134+
if: ${{ matrix.os != 'ubuntu-22.04' }}
135+
uses: actions/[email protected]
134136
with:
135-
python-version: 3.8 # if update this then also update in Dockerfile for centos
137+
python-version: 3.8 #if update this then also update in Dockerfile for centos
136138

137139
- name: Login to the Container registry
138140
if: ${{ matrix.os == 'ubuntu-22.04' }}
@@ -152,7 +154,7 @@ jobs:
152154
node --version
153155
python3 -V
154156
155-
- name: Shell configuration on CentOS 7
157+
- name: Shell configuration on centos 7
156158
if: ${{ matrix.os == 'ubuntu-22.04' }}
157159
uses: addnab/docker-run-action@v3
158160
with:
@@ -213,12 +215,14 @@ jobs:
213215
name: rapid_power_estimator_${{ matrix.os }}
214216
path: dist/rapid_power_estimator*.exe
215217

218+
216219
- name: Upload Release
217220
if: ${{ matrix.os != 'windows-latest' && contains(github.ref, 'refs/tags/') }}
218221
uses: softprops/action-gh-release@v1
219222
with:
220223
files: dist/rapid_power_estimator*.tar.gz
221224

225+
222226
- name: Upload Release
223227
if: ${{ matrix.os == 'windows-latest' && contains(github.ref, 'refs/tags/') }}
224228
uses: softprops/action-gh-release@v1
@@ -236,21 +240,14 @@ jobs:
236240
- name: Set up Python
237241
uses: actions/setup-python@v5
238242

239-
- name: Set up virtual environment
240-
run: |
241-
python3 -m venv venv
242-
source venv/bin/activate
243-
244-
- name: Install dependencies in virtual environment
245-
run: |
246-
source venv/bin/activate
247-
pip install -r requirements.txt
248-
npm install
243+
- name: Install dependencies
244+
run: |
245+
sudo apt install -y python3-venv
246+
pip install -r requirements.txt
247+
npm install
249248
250249
- name: Run pytest with Codecov
251-
run: |
252-
sudo apt install -y python3-venv
253-
python3 -m pytest --cov=src --cov=backend --cov=tests --cov-report=term-missing
250+
run: python3 -m pytest --cov=. --cov-report=term-missing
254251

255252
- name: Upload results to Codecov
256253
uses: codecov/codecov-action@v4
@@ -259,7 +256,7 @@ jobs:
259256
slug: os-fpga/rapid_power_estimator
260257

261258
- name: Run npm test with Codecov
262-
run: npm test -- --coverage
259+
run: npm test
263260

264261
- name: Upload results to Codecov
265262
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)