Skip to content
Closed
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
43 changes: 20 additions & 23 deletions .github/workflows/rpe_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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/[email protected]
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 @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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: |
source venv/bin/activate
python3 -m pytest --cov=. --cov-report=term-missing
run: python3 -m pytest --cov=. --cov-report=term-missing

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
Expand Down
Loading