-
-
Notifications
You must be signed in to change notification settings - Fork 131
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: Upgrade to CircleCI v2.0 #159
Changes from 6 commits
cda7011
c8828aa
69825ff
735bd8d
0bfffa7
fe10a91
c58865b
2bbea00
df3d349
771c6cb
91ba2ff
f5f0ac8
bdde730
743ac84
7915294
b07b54a
d9f6a81
81b6657
f497976
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
version: 2 | ||
|
||
main: &main | ||
machine: true | ||
environment: | ||
# Used by qthelpers to close widgets after a defined time | ||
- TEST_CI: "True" | ||
- TEST_CI_APP: "True" | ||
steps: | ||
- checkout | ||
- run: | ||
command: docker pull dorowu/ubuntu-desktop-lxde-vnc:trusty | ||
- run: | ||
name: Install system packages | ||
command: | | ||
sudo apt-get update | ||
sudo apt-get install libegl1-mesa | ||
- run: | ||
name: Install Miniconda | ||
command: | | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
conda install python=$PYTHON_VERSION | ||
- run: | ||
name: Install Spyder from GitHub | ||
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. There's no need to have this step now. It was needed before we released Spyder 3.2, but not anymore, so please remove it. 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. @ccordoba12 I am not sure I understand what you are saying. Do you mean that it is easier to install spyder via conda instead of via github? That is true, but I think it is better to test against the version at the head of the 3.x branch on git, in order to catch any regressions. I know that 3.x is not supposed to introduce any backward incompatibilities, but it is good to test for it. Of course, this does mean testing against a moving target which has its own problems, but I felt this approach was the most useful. 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.
Ok. I was thinking to test against the latest release, but sure, we can test against the HEAD of 3.x Then please move this to |
||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
conda install --only-deps spyder | ||
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 | ||
- run: | ||
name: Set up test environment | ||
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. The commands in this step can go to 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. And they will be simpler after switching to ci-helpers. |
||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
conda install -q notebook pytest pytest-cov flaky | ||
pip install coveralls pytest-qt | ||
python setup.py develop | ||
echo '********** output of conda list **********' | ||
conda list | ||
- run: | ||
name: Run tests | ||
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. Please move these commands to a script called |
||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
mkdir test-reports | ||
pytest spyder_notebook --cov=spyder_notebook --junitxml=test-reports/junit.xml | ||
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. This command needs to be
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. And after this command please add these lines if [ $? -ne 0 ]; then
exit 1
fi so that this step fails if the |
||
COVERALLS_REPO_TOKEN=Kr503QwklmJYKXYRXLywrtw8zbX7K8SKx coveralls | ||
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. There's no need to use COVERALLS_REPO_TOKEN in Circle now. 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. Without the token, I get the following error:
|
||
- run: | ||
name: Run style checks | ||
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. This can be removed. Unfortunately ciocheck hasn't been updated in a long time. You could set up support for pep8speaks in another PR though. |
||
command: | | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
conda install -q -c conda-forge ciocheck | ||
ciocheck spyder_notebook --disable-tests | ||
- store_test_results: | ||
path: test-reports | ||
- store_artifacts: | ||
path: test-reports | ||
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. I see test-reports is used here. Is this really necessary? 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. I think this uploads the test results to CircleCI but it is not clear what they do with it, so I'll remove this. |
||
|
||
jobs: | ||
python2.7: | ||
<<: *main | ||
environment: | ||
- PYTHON_VERSION: 2.7 | ||
|
||
python3.6: | ||
<<: *main | ||
environment: | ||
- PYTHON_VERSION: 3.6 | ||
|
||
python3.7: | ||
<<: *main | ||
environment: | ||
- PYTHON_VERSION: 3.7 | ||
|
||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- python2.7 | ||
- python3.6 | ||
- python3.7 |
This file was deleted.
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.
In this step:
install.sh
script in.circleci
ci-helpers
instead of installing Miniconda by hand. That's what we have adopted is most other repos in our org. See for example qtpy's install.sh.