Merge pull request #457 from jitseniesen/spy600b1 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
main: | |
strategy: | |
fail-fast: false | |
matrix: | |
OS: ['ubuntu', 'macos', 'windows'] | |
PYTHON_VERSION: ['3.9', '3.10', '3.11'] | |
SPYDER_SOURCE: ['git'] | |
name: ${{ matrix.OS }} py${{ matrix.PYTHON_VERSION }} spyder-from-${{ matrix.SPYDER_SOURCE }} | |
runs-on: ${{ matrix.OS }}-latest | |
env: | |
CI: True | |
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
with: | |
path: spyder-notebook | |
- name: Install System Packages | |
if: matrix.OS == 'ubuntu' | |
run: | | |
sudo apt-get update --fix-missing | |
sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing | |
- name: Install Conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.PYTHON_VERSION }} | |
- name: Checkout Spyder from git | |
if: matrix.SPYDER_SOURCE == 'git' | |
uses: actions/checkout@v4 | |
with: | |
repository: 'spyder-ide/spyder' | |
path: 'spyder' | |
- name: Install Spyder's dependencies (main) | |
if: matrix.SPYDER_SOURCE == 'git' | |
shell: bash -l {0} | |
run: conda env update --file spyder/requirements/main.yml | |
- name: Install Spyder's dependencies (Linux) | |
if: matrix.SPYDER_SOURCE == 'git' && matrix.OS == 'ubuntu' | |
shell: bash -l {0} | |
run: conda env update --file spyder/requirements/linux.yml | |
- name: Install Spyder's dependencies (Mac / Windows) | |
if: matrix.SPYDER_SOURCE == 'git' && matrix.OS != 'ubuntu' | |
shell: bash -l {0} | |
run: conda env update --file spyder/requirements/${{ matrix.OS }}.yml | |
- name: Install Spyder from source | |
if: matrix.SPYDER_SOURCE == 'git' | |
shell: bash -l {0} | |
run: pip install --no-deps -e spyder | |
- name: Install node.js | |
shell: bash -l {0} | |
run: conda install nodejs -y | |
- name: Install plugin dependencies (without Spyder) | |
if: matrix.SPYDER_SOURCE == 'git' | |
shell: bash -l {0} | |
run: | | |
python spyder-notebook/.github/scripts/generate-without-spyder.py | |
conda install --file spyder-notebook/requirements/without-spyder.txt -y | |
- name: Install plugin dependencies | |
if: matrix.SPYDER_SOURCE == 'conda' | |
shell: bash -l {0} | |
run: conda install --file spyder-notebook/requirements/conda.txt -y | |
- name: Install test dependencies | |
shell: bash -l {0} | |
run: | | |
conda install nomkl -y -q | |
conda install --file spyder-notebook/requirements/tests.txt -y | |
- name: Build JavaScript | |
shell: bash -l {0} | |
run: | | |
cd spyder-notebook/spyder_notebook/server | |
jlpm install | |
jlpm build | |
- name: Install plugin | |
shell: bash -l {0} | |
run: pip install --no-deps -e spyder-notebook | |
- name: Show environment information | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Run tests (Linux) | |
if: matrix.OS == 'ubuntu' | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
shell: bash | |
command: | | |
. ~/.profile | |
xvfb-run --auto-servernum pytest spyder-notebook/spyder_notebook -vv | |
- name: Run tests (MacOS) | |
if: matrix.OS == 'macos' | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
shell: bash | |
command: | | |
. ~/.profile | |
pytest spyder-notebook/spyder_notebook -vv | |
- name: Run tests (Windows) | |
if: matrix.OS == 'windows' | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: pytest spyder-notebook/spyder_notebook -vv |