-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup GitHub Actions for CI #445
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [2.7, 3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Add conda to $PATH | ||
run: echo ::add-path::$CONDA/condabin | ||
|
||
- name: Update conda on Mac | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
# sudo required? | ||
sudo conda update -y -n base conda setuptools | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Permissions might be a bit strict with actions. This is what we get without
|
||
|
||
- name: Update conda on Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
conda update -y -n base conda setuptools | ||
|
||
- name: Init conda | ||
run: | | ||
conda init bash | ||
conda info -a | ||
|
||
- name: Create the conda environment | ||
run: conda create -q -y -n voila-tests -c conda-forge python=$PYTHON_VERSION pip jupyter_server==0.1.0 jupyterlab_pygments==0.1.0 pytest==3.10.1 nbconvert=5.6 pytest-cov nodejs flake8 ipywidgets matplotlib xeus-cling | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
source "$CONDA/etc/profile.d/conda.sh" | ||
conda activate voila-tests | ||
whereis python | ||
python --version | ||
|
||
python -m pip install ".[test]" | ||
cd tests/test_template; pip install .; cd ../../; | ||
|
||
- name: Flake8 | ||
run: | | ||
source "$CONDA/etc/profile.d/conda.sh" | ||
conda activate voila-tests | ||
python -m flake8 voila tests setup.py | ||
|
||
- name: Run tests | ||
run: | | ||
source "$CONDA/etc/profile.d/conda.sh" | ||
conda activate voila-tests | ||
VOILA_TEST_DEBUG=1 VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 | ||
voila --help # Making sure we can run `voila --help` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.8 not available on conda yet