Skip to content
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

GitHub action migration #831

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

neiljp
Copy link
Collaborator

@neiljp neiljp commented Nov 21, 2020

This is a starting point to transition from Travis CI to GH Actions.

It is not guaranteed that this will be merged, but this provides a potential route in case of issues with Travis.

Current unfinished elements:

  • fails to run pytest with pypy3
  • unclear how the build environment compares on macos-latest to what we have in travis
  • migrate badges to refer to Actions, not Travis
  • travis config not removed
  • documentation may need updating

NOTE The pypy3 issue is the most significant to resolve, and possibly understanding the macos issue further - without at least the first, Travis cannot be fully replaced.

@neiljp neiljp added the FUTURE label Nov 21, 2020
@neiljp neiljp changed the title GitHub action migration [WIP] GitHub action migration Nov 21, 2020
with:
python-version: 3.7
- name: Install with linting tools
run: pip install .[linting]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be too much, but we could also consider adding separate setups for mypy, isort, and flake8, so that they can be installed with pip install .[mypy] and so on, instead of the [.linting] each time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The balance in existing CI and here too is intended to be between keeping dependencies centralized (setup.py only; some systems list their deps as explicit installs in CI) and not too fine-grained for clutter in that file. I agree we could in principle add more extras. I think one original motivation for having linting separate was just that mypy doesn't work so well under some testing environments, so .[testing] would fail - and incidentally this was fewer dependencies to install in each CI run.

run: pip install .[testing]
- name: Run tests with pytest
run: pytest
- name: Run codecov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we run codecov in every python version? We could consider checking a conditional here and running it on one python version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question - I think it's run in every version currently, but I'm not sure if we should simplify this. Feel free to investigate!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was resolved in #869.

@neiljp neiljp force-pushed the 2020-11-20-github-action-migration branch from 765f53e to 1b97af6 Compare December 17, 2020 00:48
neiljp added a commit to neiljp/zulip-terminal that referenced this pull request Dec 17, 2020
This does not yet run pytest under macos or pypy, but in the absence of
Travis running at all right now, this is a good first stage to ensure
branches (including PRs) and master are run through CI.

See zulip#831 for the original work on this.
Ezio-Sarthak pushed a commit to Ezio-Sarthak/zulip-terminal that referenced this pull request Dec 24, 2020
This does not yet run pytest under macos or pypy, but in the absence of
Travis running at all right now, this is a good first stage to ensure
branches (including PRs) and master are run through CI.

See zulip#831 for the original work on this.
@neiljp neiljp added General high priority should be done as soon as possible and removed FUTURE labels Jan 7, 2021
@neiljp neiljp added this to the Next Release milestone Jan 7, 2021
@neiljp
Copy link
Collaborator Author

neiljp commented Jan 7, 2021

This has been partially merged given the issues we've had with Travis, but this has meant that we've lost support for PyPy and macos for now, which we should resolve if possible by determining how to incorporate them via GitHub Actions.

@neiljp neiljp mentioned this pull request Jan 8, 2021
@neiljp neiljp force-pushed the 2020-11-20-github-action-migration branch from 1b97af6 to c3b4278 Compare January 19, 2021 01:17
@zulipbot zulipbot added the size: S [Automatic label added by zulipbot] label Jan 19, 2021
@neiljp neiljp force-pushed the 2020-11-20-github-action-migration branch 9 times, most recently from a9f55f0 to e0912f7 Compare January 19, 2021 01:53
The matrix should now cover a similar range of environments as were
covered with Travis CI.
CI has been moved fully over to GitHub Actions, so remove the duplicate
badge, update README text (and small comment) and ultimately remove the
Travis configuration file.
@neiljp neiljp force-pushed the 2020-11-20-github-action-migration branch from e0912f7 to 390819e Compare January 19, 2021 05:34
@zulipbot zulipbot added size: L [Automatic label added by zulipbot] and removed size: S [Automatic label added by zulipbot] labels Jan 19, 2021
@neiljp neiljp marked this pull request as ready for review January 19, 2021 05:40
@neiljp neiljp changed the title [WIP] GitHub action migration GitHub action migration Jan 19, 2021
@neiljp
Copy link
Collaborator Author

neiljp commented Jan 19, 2021

The last updates should have resolved the remaining issues, so any feedback on this would be welcome.

We might mention the need for external libraries for pypy3 in the notes, given it's necessary here, but that may be a more general issue to investigate too?

@rht You helped with the Travis macos setup I believe - do you have any feeling on whether the Actions version is the best translation of what we had or what we should aim for?

I'm inclined to merge this relatively soon in any case, given that this is now passing.

@rht
Copy link
Contributor

rht commented Jan 19, 2021

The Actions version for macos looks good. The only relevant parameter is the Python version, but Homebrew already provides 3.9 in their formula.

test-python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
name: Install & pytest - CPython ${{ matrix.test-python-version }}
env:
- {PYTHON: 3.5, OS: ubuntu-latest, NAME: "CPython 3.5 (ubuntu)"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is 3.5 kept though?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a separate PR for migrating away from 3.5.

@neiljp neiljp added area: infrastructure Project infrastructure and removed General labels Jan 20, 2021
@neiljp
Copy link
Collaborator Author

neiljp commented Jan 20, 2021

OK, I'm going to merge this now; the 3.5 removal is in #838.

@neiljp neiljp merged commit 0c3e173 into zulip:master Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Project infrastructure high priority should be done as soon as possible size: L [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants