From 3338fe5c4f948c3cca663d1b1a94db7935a7a90b Mon Sep 17 00:00:00 2001 From: David PAGNON Date: Sun, 30 Jun 2024 15:57:15 +0200 Subject: [PATCH] Test opensim install (need conda env) --- .github/workflows/continuous-integration.yml | 24 +++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 0131d90..4170256 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -42,18 +42,30 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install Miniconda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + activate-environment: pose2sim + + - name: Install OpenSim with conda + run: conda install -c opensim-org opensim-moco -y + - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - python -m pip install git+https://github.com/${{ github.repository }}.git@${{ github.sha }} + conda run -n pose2sim python -m pip install --upgrade pip + conda run -n pose2sim python -m pip install flake8 pytest + conda run -n pose2sim python -m pip install git+https://github.com/${{ github.repository }}.git@${{ github.sha }} + - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + conda run -n pose2sim flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + conda run -n pose2sim flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest run: | cd Pose2Sim/S00_Demo_BatchSession - pytest -v tests.py + conda run -n pose2sim pytest -v tests.py