Skip to content

Signed-off-by: Jonas Harrison <[email protected]> #191

Signed-off-by: Jonas Harrison <[email protected]>

Signed-off-by: Jonas Harrison <[email protected]> #191

Workflow file for this run

name: Run Unit Tests
on: push
# on:
# push:
# branches:
# -'arm/**'
# pull_request:
# branches:
# -'arm/**'
jobs:
# test_arm64:
# if: github.repository == 'Jonas-Harrison-ICS/python_ics'
# name: Linux ARM64 unit tests
# runs-on: [ self-hosted, Linux, ARM64, Hardware ]
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
# # needed for history/tags##
# - name: Setup Python
# run: |
# python3 -m venv .venv
# source .venv/bin/activate
# python3 -m pip install --upgrade pip
# echo "----------------------------------------------"
# pip install -r requirements.txt
# pwd
# echo "----------------------------------------------"
# python setup.py build -g
# python setup.py install --force
# # pip install .
# - name: Run unit tests
# run: |
# source .venv/bin/activate
# sudo setcap cap_net_admin,cap_net_raw+ep $(realpath $(which python3))
# python3 -m unittest discover -s tests.runner --verbose
# pytest -n auto
test_macos:
if: github.repository == 'Jonas-Harrison-ICS/python_ics'
name: MAC-OS ARM64 unit tests
runs-on: [ self-hosted, macOS, ARM64, Hardware ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# needed for history/tags##
- name: Setup Python
run: |
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
echo "----------------------------------------------"
pip install -r requirements.txt
pwd
echo "----------------------------------------------"
python setup.py build -g
python setup.py install --force
# pip install .
- name: Run unit tests
run: |
source .venv/bin/activate
python3 -m unittest discover -s tests.runner --verbose
pytest -n auto
test_windows:
if: github.repository == 'Jonas-Harrison-ICS/python_ics'
name: Windows unit tests
runs-on: [ self-hosted, Windows, x64, Hardware ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# needed for history/tags##
- name: Setup Python
run: |
python -m venv .venv
.venv\Scripts\Activate.ps1
Write-Output "---------------------------------------------- VIRTUAL ENV CREATED"
python -m pip install --upgrade pip
Write-Output "---------------------------------------------- PIP INSTALLED"
pip install -r requirements.txt
pwd
Write-Output "---------------------------------------------- INSTALLED REQUIREMENTS.TXT"
python setup.py build -g
Write-Output "---------------------------------------------- PYTHON SETUP BUILT"
python setup.py install --force
Write-Output "---------------------------------------------- PYTHON SETUP INSTALLED"
# pip install .
- name: Run unit tests
run: |
.venv\Scripts\Activate.ps1
python -m unittest discover -s tests.runner --verbose
pytest -n auto