Skip to content

[WIP] Testing the tests (Still scaling though) #18

[WIP] Testing the tests (Still scaling though)

[WIP] Testing the tests (Still scaling though) #18

Workflow file for this run

name: Run the tests
on: [pull_request]
env:
EXAMPLES_FOLDER: examples
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/biobuddy
- os: macos-latest
label: osx-arm64
prefix: /Users/runner/miniconda3/envs/biobuddy
- os: macos-13
label: osx-intel
prefix: /Users/runner/miniconda3/envs/biobuddy
- os: windows-latest
label: win-64
prefix: C:\Miniconda3\envs\biobuddy
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
- name: Set up Python
run: |
conda install -cconda-forge python=3.11.11 pip
- name: Install dependencies
run: |
pip install . && pip uninstall -y biobuddy
pip install scipy==1.15.1 numpy==1.25.2 matplotlib lxml
- name: Install test dependencies
run: |
pip install pytest pytest-cov codecov ezc3d
conda install -c opensim-org opensim=4.5.1
conda install -c conda-forge biorbd=1.11.0
- name: Run tests with code coverage
run: pytest -v --color=yes --cov-branch --cov-report=xml --cov=biobuddy tests
- name: Send Codecov report
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: unittests
fail_ci_if_error: true
verbose: true
if: matrix.os == 'ubuntu-latest'
- name: Test installed version of python
run: |
BASE_FOLDER=`pwd`
pip install .
cd
python -c "import biobuddy"
cd $BASE_FOLDER