From c0d1b0b0b829486cb3436fcb4b71809350656d34 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Oct 2024 14:29:56 -0700 Subject: [PATCH 1/4] coverage improvement on codecov --- .github/workflows/rpe_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rpe_test.yml b/.github/workflows/rpe_test.yml index 67bd25ad..10ad3f9f 100644 --- a/.github/workflows/rpe_test.yml +++ b/.github/workflows/rpe_test.yml @@ -250,7 +250,7 @@ jobs: - name: Run pytest with Codecov run: | source venv/bin/activate - python3 -m pytest --cov=. --cov-report=term-missing + python3 -m pytest --cov=src --cov=backend --cov=tests --cov-report=term-missing - name: Upload results to Codecov uses: codecov/codecov-action@v4 @@ -259,7 +259,7 @@ jobs: slug: os-fpga/rapid_power_estimator - name: Run npm test with Codecov - run: npm test + run: npm test -- --coverage - name: Upload results to Codecov uses: codecov/codecov-action@v4 From 5217dc385d9d94561f2df85fa0c538ba7e3eca15 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Oct 2024 14:34:15 -0700 Subject: [PATCH 2/4] coverage improvement on codecov --- .github/workflows/rpe_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rpe_test.yml b/.github/workflows/rpe_test.yml index 10ad3f9f..a986e458 100644 --- a/.github/workflows/rpe_test.yml +++ b/.github/workflows/rpe_test.yml @@ -249,7 +249,6 @@ jobs: - name: Run pytest with Codecov run: | - source venv/bin/activate python3 -m pytest --cov=src --cov=backend --cov=tests --cov-report=term-missing - name: Upload results to Codecov From cf4768568b7acaea93fc465a006ff7c6c717ff7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Oct 2024 14:36:52 -0700 Subject: [PATCH 3/4] coverage improvement on codecov --- .github/workflows/rpe_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rpe_test.yml b/.github/workflows/rpe_test.yml index a986e458..48d07be0 100644 --- a/.github/workflows/rpe_test.yml +++ b/.github/workflows/rpe_test.yml @@ -249,6 +249,7 @@ jobs: - name: Run pytest with Codecov run: | + sudo apt install -y python3-venv python3 -m pytest --cov=src --cov=backend --cov=tests --cov-report=term-missing - name: Upload results to Codecov From 8b24b5e87ae4c06f645d85b9b300173dc69c3fb6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Oct 2024 14:49:10 -0700 Subject: [PATCH 4/4] coverage improvement on codecov --- .github/workflows/rpe_test.yml | 45 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/.github/workflows/rpe_test.yml b/.github/workflows/rpe_test.yml index 48d07be0..00cbd93f 100644 --- a/.github/workflows/rpe_test.yml +++ b/.github/workflows/rpe_test.yml @@ -33,12 +33,13 @@ jobs: if: ${{ matrix.os != 'ubuntu-22.04' }} uses: actions/setup-node@v4 with: - node-version: 20.11 # if update this then also update in Dockerfile for centos + node-version: 20.11 #if update this then also update in Dockerfile for centos - name: Setup Python - uses: actions/setup-python@v5 + if: ${{ matrix.os != 'ubuntu-22.04' }} + uses: actions/setup-python@v5.0.0 with: - python-version: 3.8 # if update this then also update in Dockerfile for centos + python-version: 3.8 #if update this then also update in Dockerfile for centos - name: Login to the Container registry if: ${{ matrix.os == 'ubuntu-22.04' }} @@ -58,13 +59,13 @@ jobs: node --version python3 -V - - name: Shell configuration on CentOS 7 + - name: Shell configuration on centos 7 if: ${{ matrix.os == 'ubuntu-22.04' }} uses: addnab/docker-run-action@v3 with: shell: bash image: ghcr.io/${{ github.repository_owner }}/rapid_power_estimator:centos7latest - run: | + run: source /opt/rh/devtoolset-11/enable cmake --version node --version @@ -81,7 +82,7 @@ jobs: run: | npx eslint src/ - - name: Install packages CentOS 7 & Run pytest & frontend test + - name: Install packages centos 7 & Run pytest & frontend test if: ${{ matrix.os == 'ubuntu-22.04' }} uses: addnab/docker-run-action@v3 with: @@ -127,12 +128,13 @@ jobs: if: ${{ matrix.os != 'ubuntu-22.04' }} uses: actions/setup-node@v4 with: - node-version: 20.11 # if update this then also update in Dockerfile for centos + node-version: 20.11 #if update this then also update in Dockerfile for centos - name: Setup Python - uses: actions/setup-python@v5 + if: ${{ matrix.os != 'ubuntu-22.04' }} + uses: actions/setup-python@v5.0.0 with: - python-version: 3.8 # if update this then also update in Dockerfile for centos + python-version: 3.8 #if update this then also update in Dockerfile for centos - name: Login to the Container registry if: ${{ matrix.os == 'ubuntu-22.04' }} @@ -152,7 +154,7 @@ jobs: node --version python3 -V - - name: Shell configuration on CentOS 7 + - name: Shell configuration on centos 7 if: ${{ matrix.os == 'ubuntu-22.04' }} uses: addnab/docker-run-action@v3 with: @@ -213,12 +215,14 @@ jobs: name: rapid_power_estimator_${{ matrix.os }} path: dist/rapid_power_estimator*.exe + - name: Upload Release if: ${{ matrix.os != 'windows-latest' && contains(github.ref, 'refs/tags/') }} uses: softprops/action-gh-release@v1 with: files: dist/rapid_power_estimator*.tar.gz + - name: Upload Release if: ${{ matrix.os == 'windows-latest' && contains(github.ref, 'refs/tags/') }} uses: softprops/action-gh-release@v1 @@ -236,21 +240,14 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 - - name: Set up virtual environment - run: | - python3 -m venv venv - source venv/bin/activate - - - name: Install dependencies in virtual environment - run: | - source venv/bin/activate - pip install -r requirements.txt - npm install + - name: Install dependencies + run: | + sudo apt install -y python3-venv + pip install -r requirements.txt + npm install - name: Run pytest with Codecov - run: | - sudo apt install -y python3-venv - python3 -m pytest --cov=src --cov=backend --cov=tests --cov-report=term-missing + run: python3 -m pytest --cov=. --cov-report=term-missing - name: Upload results to Codecov uses: codecov/codecov-action@v4 @@ -259,7 +256,7 @@ jobs: slug: os-fpga/rapid_power_estimator - name: Run npm test with Codecov - run: npm test -- --coverage + run: npm test - name: Upload results to Codecov uses: codecov/codecov-action@v4