-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
GitHub action migration #831
Conversation
.github/workflows/lint-and-test.yml
Outdated
with: | ||
python-version: 3.7 | ||
- name: Install with linting tools | ||
run: pip install .[linting] |
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.
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.
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.
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.
.github/workflows/lint-and-test.yml
Outdated
run: pip install .[testing] | ||
- name: Run tests with pytest | ||
run: pytest | ||
- name: Run codecov |
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.
Should we run codecov
in every python version? We could consider checking a conditional here and running it on one python version.
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.
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!
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 was resolved in #869.
765f53e
to
1b97af6
Compare
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.
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.
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. |
1b97af6
to
c3b4278
Compare
a9f55f0
to
e0912f7
Compare
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.
e0912f7
to
390819e
Compare
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. |
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)"} |
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.
Why is 3.5 kept though?
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.
There's a separate PR for migrating away from 3.5.
OK, I'm going to merge this now; the 3.5 removal is in #838. |
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:
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.