Skip to content

Update workflow

Update workflow #87

Workflow file for this run

name: Tests
on:
push:
branches-ignore:
- 'dependabot/*'
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
run_test_site:
name: ${{ matrix.os }}-${{ matrix.PACKAGE_MANAGER }}-py${{ matrix.PYTHON_VERSION }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
env:
PIP_ARGS: '-e .'
PIP_SELECTOR: ''
MPLBACKEND: agg
PYTEST_ARGS: --pyargs start_jupyter_cm
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-13", "macos-latest", "windows-latest"]
PYTHON_VERSION: ['3.8', '3.10', '3.12']
PACKAGE_MANAGER: [conda, pip]
# Use only in conda based distribution
ENVIRONMENT_NAME: ["test_env"]
TEST_DEPS: ["qtconsole jupyterlab pytest"]
include:
# The python version of the base environment will be what comes with
# the distribution
- os: ubuntu-latest
ENVIRONMENT_NAME: ''
PACKAGE_MANAGER: conda
TEST_DEPS: 'qtconsole jupyterlab pytest'
LABEL: _base_env
- os: ubuntu-latest
PYTHON_VERSION: '3.13-dev'
PACKAGE_MANAGER: pip
TEST_DEPS: 'qtconsole pytest'
exclude:
# pip on macos doesn't seemt to play well with bash -l {0}, which is
# required to use setup-miniconda
- os: macos
PACKAGE_MANAGER: pip
steps:
- uses: actions/checkout@v4
- name: Install file manager
if: runner.os == 'linux'
run: |
sudo apt-get update -y
sudo apt-get install -y nautilus dolphin caja libglib2.0-bin nemo
- uses: conda-incubator/setup-miniconda@v3
if: ${{ matrix.PACKAGE_MANAGER == 'conda' }}
with:
auto-activate-base: true
activate-environment: ${{ matrix.ENVIRONMENT_NAME }}
python-version: ${{ matrix.PYTHON_VERSION }}
miniforge-variant: Mambaforge
- uses: actions/setup-python@v5
if: ${{ matrix.PACKAGE_MANAGER == 'pip' }}
name: Install Python
with:
python-version: ${{ matrix.PYTHON_VERSION }}
- name: Display version
shell: bash -l {0}
run: |
python --version
pip --version
- name: Install
shell: bash -l {0}
run: |
pip install ${{ env.PIP_ARGS }}
- name: Install test dependencies (pip)
if: ${{ matrix.PACKAGE_MANAGER == 'pip' }}
shell: bash -l {0}
run: |
pip install ${{ matrix.TEST_DEPS }}
- name: Install test dependencies (conda)
if: ${{ matrix.PACKAGE_MANAGER == 'conda' }}
shell: bash -l {0}
run: |
mamba install ${{ matrix.TEST_DEPS }}
- name: Run test suite
shell: bash -l {0}
run: |
pytest ${{ env.PYTEST_ARGS }}
- name: Test command
shell: bash -l {0}
run: |
start_jupyter_cm
start_jupyter_cm --remove