Skip to content

Set up CI with Azure Pipelines #12617

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

Merged
merged 21 commits into from
Nov 2, 2018
Merged

Set up CI with Azure Pipelines #12617

merged 21 commits into from
Nov 2, 2018

Conversation

azure-pipelines[bot]
Copy link
Contributor

First pass at setting up azure pipelines

@tacaswell
Copy link
Member

Notes from:

  • webserver may not be allowed to listen on default port
  • may be able to attach failed test images to junit xml
  • failing that, there are uploads steps to see failed images

no guesses yet on the failing gui test...

@tacaswell tacaswell added this to the v3.1 milestone Oct 24, 2018
@phobson
Copy link
Member

phobson commented Nov 2, 2018

@tacaswell

2018-11-02T20:55:59.7604603Z [gw0] linux -- Python 3.5.5 /opt/hostedtoolcache/Python/3.5.5/x64/python
2018-11-02T20:55:59.7604713Z 
2018-11-02T20:55:59.7605152Z     @pytest.mark.skipif(os.name == "nt", reason="Cannot send SIGINT on Windows.")
2018-11-02T20:55:59.7606710Z     def test_webagg():
2018-11-02T20:55:59.7610820Z         pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ)
2018-11-02T20:55:59.7611019Z         pytest.importorskip("tornado")
2018-11-02T20:55:59.7612108Z         proc = subprocess.Popen([sys.executable, "-c", _test_script],
2018-11-02T20:55:59.7613937Z                                 env={**os.environ, "MPLBACKEND": "webagg"})
2018-11-02T20:55:59.7615213Z         url = "http://{}:{}".format(
2018-11-02T20:55:59.7616952Z             mpl.rcParams["webagg.address"], mpl.rcParams["webagg.port"])
2018-11-02T20:55:59.7618457Z         timeout = time.perf_counter() + _test_timeout
2018-11-02T20:55:59.7619405Z         while True:
2018-11-02T20:55:59.7620863Z             try:
2018-11-02T20:55:59.7622102Z                 retcode = proc.poll()
2018-11-02T20:55:59.7623560Z                 # check that the subprocess for the server is not dead
2018-11-02T20:55:59.7624752Z >               assert retcode is None
2018-11-02T20:55:59.7627170Z E               assert 0 is None

Would be appropriate to say assert not retcode here?

@tacaswell
Copy link
Member

The issue is that for some reason the webserver starts and then immediately exits. If the process is still running poll return None, if it is exited, it return the returncode (which in this case is 0).

I can not see to identify the we are on azure to skip these two....

@phobson
Copy link
Member

phobson commented Nov 2, 2018

I've been digging around trying to see if we can pass an e.g., --is-azure flag to the command line and check for that as a global variable/fixture

@phobson
Copy link
Member

phobson commented Nov 2, 2018

something like this maybe. need to tinker a bit
pytest-dev/pytest#2358

@tacaswell
Copy link
Member

I found a more fundamental problem with my approach... (see the last commit).

@tacaswell
Copy link
Member

If this passes I am going to self squash-merge.

@jklymak
Copy link
Member

jklymak commented Nov 2, 2018

It passes!

@tacaswell tacaswell merged commit 531bd02 into master Nov 2, 2018
@tacaswell tacaswell deleted the azure-pipelines branch November 2, 2018 23:31
@tacaswell
Copy link
Member

@meeseeksdev backport to v3.0.x

@tacaswell
Copy link
Member

@meeseeksdev backport to v2.2.x

@lumberbot-app
Copy link

lumberbot-app bot commented Nov 2, 2018

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v2.2.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 531bd02409ba5efd75ec13f713f6faf6974199d4
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #12617: Set up CI with Azure Pipelines'
  1. Push to a named branch :
git push YOURFORK v2.2.x:auto-backport-of-pr-12617-on-v2.2.x
  1. Create a PR against branch v2.2.x, I would have named this PR:

"Backport PR #12617 on branch v2.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

@tacaswell
Copy link
Member

Backporting this so that CI passes on the old branchs (I don't see how to restrict azure to just the master branch).

@tacaswell tacaswell modified the milestones: v3.1, v2.2.4 Nov 2, 2018
@jklymak
Copy link
Member

jklymak commented Nov 3, 2018

So, does this mean we don't need the Travis checks anymore?

thoo added a commit to thoo/matplotlib that referenced this pull request Nov 3, 2018
* 'master' of https://github.com/matplotlib/matplotlib: (50 commits)
  Set up CI with Azure Pipelines (matplotlib#12617)
  Added comment for test.
  Correctly remove nans when drawing paths with pycairo.
  Improve docs on Axes limits and direction
  Extend sphinx Makefile to cleanup completely
  Remove explicit figure number
  Update contributing.rst
  Update contributing.rst
  DOC: Add badge and link to making PR tutorial
  Added test cases for scatter plot: 1) empty data/color, 2) pandas.Series with non-0 starting index.
  TST: mark test_constrainedlayout.py::test_colorbar_location as flaky (matplotlib#12683)
  Remove deprecation warnings in tests (matplotlib#12686)
  Make ticks in demo_axes_rgb.py visible
  Change ipython block to code-block
  Improve linestyles example (matplotlib#12586)
  document-textpath
  Fix index out of bound error for testing first element of iterable.
  TST: test that get_ticks works
  FIX: fix error in colorbar.get_ticks not having valid data
  Replaced warnings.warn with either logging.warnings or cbook._warn_external
  ...
@QuLogic
Copy link
Member

QuLogic commented Nov 3, 2018

It doesn't seem like it actually ran on the backport, so maybe you don't need it?

dstansby added a commit that referenced this pull request Nov 3, 2018
…617-on-v3.0.x

Backport PR #12617 on branch v3.0.x (Set up CI with Azure Pipelines)
@tacaswell tacaswell modified the milestones: v2.2.4, v3.0.2 Nov 9, 2018
@tacaswell
Copy link
Member

As we can turn this on by-branch lets not drag this back to 2.2.x unless someone feel very motivated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants