0.4.x: Fix linters #3077
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
schedule: | |
- cron: "0 2 * * 1-5" # run on weekdays at 2:00am UTC | |
jobs: | |
test-linux: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python_version: ['3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
channels: conda-forge | |
- name: Create the conda environment | |
shell: bash -l {0} | |
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
whereis python | |
python --version | |
yarn install --network-timeout 100000 | |
python -m pip install ".[test]" | |
(cd tests/test_template; pip install .) | |
(cd tests/skip_template; pip install .) | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1 | |
voila --help # Making sure we can run `voila --help` | |
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection | |
# Note that wget is the only easily available software that has a read-timeout | |
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 & | |
sleep 2 | |
wget --read-timeout=5 --tries=1 http://localhost:8878 | |
- name: Flake8 | |
shell: bash -l {0} | |
run: | | |
python -m flake8 voila tests setup.py | |
test-osx: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-10.15] | |
python_version: ['3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniforge-variant: Mambaforge | |
channels: conda-forge | |
- name: Create the conda environment | |
shell: bash -l {0} | |
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6" | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
whereis python | |
python --version | |
yarn install --network-timeout 100000 | |
python -m pip install ".[test]" | |
(cd tests/test_template; pip install .) | |
(cd tests/skip_template; pip install .) | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1 | |
voila --help # Making sure we can run `voila --help` | |
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection | |
# Note that wget is the only easily available software that has a read-timeout | |
voila tests/notebooks/sleep10seconds.ipynb --port=8878 --VoilaConfiguration.http_keep_alive_timeout=2 & | |
sleep 2 | |
wget --read-timeout=5 --tries=1 http://localhost:8878 | |
test-win: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: | | |
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rereunfailures flake8 ipywidgets matplotlib traitlets | |
yarn install --network-timeout 100000 | |
python -m pip install ".[test]" | |
cd tests/test_template | |
pip install . | |
cd ../skip_template | |
pip install . | |
- name: Run test | |
run: | | |
set VOILA_TEST_DEBUG=1 | |
py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1 |