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
Migrate CI workflows from Travis CI to GitHub Actions #108
Conversation
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8"] |
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.
I dropped Python 3.5 from here and the package metadata because it goes end-of-life on 2020-09-13. Do you think that's going to cause any significant problems?
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.
I don't foresee problems there.
@@ -179,7 +179,7 @@ def clear_children(self): | |||
Return: | |||
Catalog: Returns ``self`` | |||
""" | |||
self.links = [l for l in self.links if l.rel != 'child'] |
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.
All of the Python specific changes below are to resolve outstanding linter warnings.
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.
Interesting that the linter is picking these up now as opposed to before through local and travis. Wonder if this rule was introduced in a later version? I have flake8 3.7.8 and 0.28.0 on my machine.
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.
After looking at this closer, it looks like this was caused by a mistake on my part. I was following the guidance of my editor, which was using a newer version of flake8
(3.8.3).
Most of the issues were related to E741. I think two reasonable paths forward are:
- Bump
flake8
inrequirements-dev.txt
to 3.8+ and keep the adjustments in. - Revert the adjustments and keep the dependencies as-is.
I'm in favor of #1 because it seems like a reasonable role, and updating flake8
makes sense. What do you think?
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.
I agree, #1 makes sense, would be best upgrade and the lint changes are improvements.
|
||
set -e | ||
|
||
if [[ -n "${CI}" ]]; then |
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 is set in the GitHub Actions execution environment by default.
|
||
- name: Build and publish package | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_AZAVEA_USERNAME }} |
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.
These PyPI credentials are pulled from the GitHub organizational level (azavea
). I also swapped ownership within PyPI from rasterfoundry
-> azavea
. The rasterfoundry
PyPI user is still listed as a maintainer.
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.
Nice, thanks.
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.
Pulled this down and ran through scripts/test
. Looked at the GitHub action outputs. Everything looks good.
I made two comments on small non-critical changes that can be addressed either in this PR in follow ups.
Migrate the existing Travis CI testing workflow to GitHub Actions, by achieving the following success criteria: - Trigger linters, code formatters, and test suites on pull requests - Ensure that the builds test against Python version 3.6-3.8 - Cache dependencies across builds - Trigger PyPI releases of Python 3.x packages on tagged releases
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.
Tested flake8 upgrade and unit test change locally. 👍
7e56e84
to
273def9
Compare
Migrate the existing Travis CI testing workflow to GitHub Actions. The following baseline success criteria has been addressed:
Fixes #103
Fixes #104
Testing
test
executes cleanly$ ./scripts/test