-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1.01 KB
/
unittests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Run Unittests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt install build-essential # GNU C++ compiler
sudo apt install libboost-all-dev # C++ libraries provided by Boost
sudo apt install swig # python -> C++ bridge
python -m pip install --upgrade pip
pip install tox
- name: Run tox tests
run: |
TOX_FILE=$(find . -name tox.ini)
echo "-> Located tox file at $TOX_FILE"
if [ -f "setup.py" ]; then
echo "-> Found setup.py, using tox.ini with pkg environment"
tox -c $TOX_FILE -e pkg $RECREATE_FLAG
else
echo "-> No setup.py found, using tox.ini with requirements environment"
tox -c $TOX_FILE -e req $RECREATE_FLAG
fi