-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
PR: Enable CircleCI and first tests addition #30
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
15e3460
Add Circle.yml configuration
andfoy cf3c754
Add ciocheck configuration file
andfoy 4e4ad17
Remove Coveralls token from circle.yml
andfoy 77015fe
Use PyQt 5.9
andfoy ac65b26
Ciocheck on spyder-vim folder
andfoy 1d0f0b3
Remove Quantified Code file
andfoy d9474bf
Update setup.py
andfoy 0edaa77
Add vim-related info to setupy
andfoy 502c721
Docstrings added
andfoy 7ccc717
Fix regexp tests
andfoy 7b1c40a
Add displacement shortcuts tests
andfoy 8f8b378
Add MOck to conda dependencies
andfoy e5556c0
Docstrings added
andfoy 69ddfec
Add vim command tests
andfoy e006366
Add copy command tests
andfoy e9e3f9f
Add tests for colon commands
andfoy 8f1b142
Add visual mode tests
andfoy 9ffed15
Rename foo.py to foo.txt
andfoy e6c2129
Replace mock.assert_called by mock.assert_called_once
andfoy 9984838
Try with assert_called_once_with
andfoy e54528d
Update README
andfoy File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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,52 @@ | ||
# https://circleci.com/gh/spyder-ide/spyder-vim/ | ||
|
||
machine: | ||
environment: | ||
# Python versions to tests (Maximum of 4 different versions) | ||
# The last container is used to test with pyqt5 wheels | ||
PY_VERSIONS: "2.7 3.6 3.5" | ||
# For Coveralls | ||
COVERALLS_REPO_TOKEN: sTGxv5iQxuiBQCoxLB53t6m2xSe58rAIq | ||
# Environment variables used by astropy helpers | ||
TRAVIS_OS_NAME: "linux" | ||
CONDA_DEPENDENCIES_FLAGS: "--quiet" | ||
CONDA_DEPENDENCIES: "pytest pytest-cov" | ||
PIP_DEPENDENCIES: "coveralls coloredlogs pytest-qt pytest-xvfb flaky" | ||
|
||
dependencies: | ||
pre: | ||
# We need to run a window manager to avoid focus problems when running our tests. | ||
# See https://github.com/TestFX/TestFX/issues/158#issuecomment-62421691 | ||
- sudo apt-get install matchbox-window-manager | ||
override: | ||
# First convert PY_VERSIONS to an array and then select the python version based on the CIRCLE_NODE_INDEX | ||
- export PY_VERSIONS=($PY_VERSIONS) && | ||
export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} && | ||
echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============" && | ||
git clone git://github.com/astropy/ci-helpers.git > /dev/null && | ||
source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh && | ||
export PATH="$HOME/miniconda/bin:$PATH" && | ||
source activate test && | ||
conda install -q ciocheck -c spyder-ide --no-update-deps && | ||
if [ "$CIRCLE_NODE_INDEX" = "2" ]; then pip install -q spyder pyqt5==5.8.0; else conda install -q -y spyder; fi && | ||
if [ "$CIRCLE_NODE_INDEX" = "2" ]; then pip uninstall -q -y spyder; else conda remove -q -y spyder; fi && | ||
mkdir spyder-source && cd spyder-source && | ||
wget -q https://github.com/spyder-ide/spyder/archive/3.x.zip && unzip -q 3.x.zip && | ||
cd spyder-3.x && python setup.py install > /dev/null && | ||
cd ../../ && | ||
pip install .; | ||
- DISPLAY=:99 /usr/bin/matchbox-window-manager: | ||
background: true | ||
- sleep 5 | ||
|
||
test: | ||
override: | ||
# Style checks | ||
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && ciocheck spyder_terminal: # note the colon | ||
parallel: true | ||
# Tests | ||
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && python runtests.py: # note the colon | ||
parallel: true | ||
# Coveralls | ||
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls: # note the colon | ||
parallel: true |
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright © Spyder Project Contributors | ||
# Licensed under the terms of the MIT License | ||
# | ||
|
||
""" | ||
File for running tests programmatically. | ||
""" | ||
|
||
# Third party imports | ||
import pytest | ||
|
||
|
||
def main(): | ||
""" | ||
Run pytest tests. | ||
""" | ||
errno = pytest.main(['-x', 'spyder_vim', '-v', | ||
'-rw', '--durations=10', | ||
'--cov=spyder_vim', '--cov-report=term-missing']) | ||
|
||
# sys.exit doesn't work here because some things could be running | ||
# in the background (e.g. closing the main window) when this point | ||
# is reached. And if that's the case, sys.exit does't stop the | ||
# script (as you would expected). | ||
if errno != 0: | ||
raise SystemExit(errno) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
File renamed without changes.
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.
This token should be deleted from here (and regenerated), and added instead to https://circleci.com/gh/spyder-ide/spyder-vim/edit#env-vars