From dbd3e1bdf4fb38d6eee540480084f1cadc00fc97 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Wed, 29 Nov 2023 15:25:32 +0000 Subject: [PATCH] Custom test run for Windows --- .github/workflows/test_and_deploy.yml | 47 +++++++++++++++++---------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 7d75fc2e..b37f7017 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -36,35 +36,48 @@ jobs: if: runner.os == 'macOS' run: brew install hdf5 - - name: Set up Python ${{ matrix.python-version }} - if: runner.os == 'Windows' - uses: actions/setup-python@v4 + # Helps set up VTK with a headless display + - uses: pyvista/setup-headless-display-action@v2 + + # Sets up ffmpeg to we can run video tests on CI + - uses: FedericoCarboni/setup-ffmpeg@v2 + id: setup-ffmpeg + + # Run tests + - uses: neuroinformatics-unit/actions/test@v2 + if: runner.os != 'Windows' with: python-version: ${{ matrix.python-version }} - - name: Setup Conda + # Windows custom steps + - name: Setup Conda on Windows if: runner.os == 'Windows' uses: s-weigand/setup-conda@v1 + with: + python-version: ${{ matrix.python-version }} - - name: Change Conda solver + - name: Change Conda solver and install Pyside2 if: runner.os == 'Windows' - run: conda config --set solver libmamba + run: | + conda config --set solver libmamba + conda install -c conda-forge pyside2 --yes - - name: Install pyside2 for Windows + - uses: actions/checkout@v3 if: runner.os == 'Windows' - run: conda install -c conda-forge pyside2 --yes - # Helps set up VTK with a headless display - - uses: pyvista/setup-headless-display-action@v2 + - name: Install tox + if: runner.os == 'Windows' + run: | + pip install tox + tox --version - # Sets up ffmpeg to we can run video tests on CI - - uses: FedericoCarboni/setup-ffmpeg@v2 - id: setup-ffmpeg + - name: Run tests + if: runner.os == 'Windows' + run: tox - # Run tests - - uses: neuroinformatics-unit/actions/test@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Report coverage to codecov + if: runner.os == 'Windows' + uses: codecov/codecov-action@v3 build_sdist_wheels: name: Build source distribution