Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions .github/workflows/rpe_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ 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
if: ${{ matrix.os != 'ubuntu-22.04' }}
uses: actions/[email protected]
uses: actions/setup-python@v5
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' }}
Expand All @@ -59,13 +58,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
Expand All @@ -82,7 +81,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:
Expand Down Expand Up @@ -128,13 +127,12 @@ 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
if: ${{ matrix.os != 'ubuntu-22.04' }}
uses: actions/[email protected]
uses: actions/setup-python@v5
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' }}
Expand All @@ -154,7 +152,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:
Expand Down Expand Up @@ -215,14 +213,12 @@ 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
Expand All @@ -240,13 +236,21 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5

- name: Install dependencies
run: |
pip install -r requirements.txt
npm install
- 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: Run pytest with Codecov
run: python3 -m pytest --cov=. --cov-report=term-missing
run: |
source venv/bin/activate
python3 -m pytest --cov=. --cov-report=term-missing

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
Expand All @@ -261,4 +265,4 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: os-fpga/rapid_power_estimator
slug: os-fpga/rapid_power_estimator
Loading