-
Notifications
You must be signed in to change notification settings - Fork 112
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
[WIP] Move all CI/CD to Github Actions #446
Conversation
- Remove python-env from tox.ini files, use gh-actions matrix for running different python versions - Define tox runs as `tox -e [lint/format/flake8/test]`
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.
Looks great! It's a bit of shame we can't see the actual github run - @rbavery do you have permissions to give me and @srmsoumya mantainer roles in this repository?
# - name: Format with tox | ||
# run: tox -e format |
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.
Would be great to make a separate PR with all the formatting changes so that version 0.5 is formatted
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.
Created this PR #448 . Would be great to merge before this.
- name: Test with tox | ||
run: tox | ||
run: tox -e test |
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.
Since we're at it maybe we can also add the workflow to deploy the package to pypi using the ttox
build commands?
tox -e build && tox -e release
Maybe we can use this github action with a manual approval step using a "release" environment? https://cloudlumberjack.com/posts/github-actions-approvals/
Would be totally OK if we leave this for another PR
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 think there is build & release script already added to the tox.ini
file by @rbavery.
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 think Rodrigo's method sounds like a good option to switch to, I don't think I added the build and release script(it was already there). It'd be great to handle this with a gh action with a manual approval step
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.
@srmsoumya do you need pypi credentials to authenticate this manual progress? @avanetten do you have these available and could you share them in an email?
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.
Added a release workflow here #449
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.
No Manual step for now but it will only run if you add a tag to the PR that increases the version.
@rodrigoalmeida94 @srmsoumya thanks for the heads up, just added you both as admins |
@srmsoumya one thing I noticed with Also the lint command |
- Tested github-actions locally using act. - osgeo ubuntu-large images are 1.4 GB in size, takes some time to run this locally - Replacing this with ubuntu-small runs it faster with no side effects
@rodrigoalmeida94 I guess you already figured this out. FWIW, adding runs like a list in tox files returns success code even when it fails the CI check. |
commands= | ||
python -m pytest --cov --cov-report xml --cov-report term-missing --ignore=venv | ||
commands = | ||
- python -m pytest --cov --cov-report xml --cov-report term-missing --ignore=venv |
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 minus should not be here, otherwise this will always return success even if the tests fail
@srmsoumya seems the issues has to do with writing commands with
Will always return success (even if there are linter errors). |
#451 supersedes this PR |
This PR adds support to lint, format & test the codebase across different python & gdal versions.
Description
We can run different steps as:
tox -e [lint/test/format/flake8]
We are not relying on
tox.ini
file for running different python environments. That is taken care of using github runners. I commented out the format step as that would modify the codebase.Fixes #440 [WIP]
Type of change
How Has This Been Tested?
There is technically no change in the codebase, so I have not added any new testcases.
Checklist:
cc @rbavery @vincentsarago