-
Notifications
You must be signed in to change notification settings - Fork 16
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 deployment workflow for PyPI #337
Conversation
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.
Great start, this should get us most of the way there. I'd like to see some changes.
- Lets use this action https://github.com/pypa/gh-action-pypi-publish
- I'd like to upload the built files as a release to github, I found some examples using gh cli to do that, but we will need a github token, which I can provide.
- I'd like to trigger this via a TAG. That tag would start this workflow and if completed will create a release on github with the built files.
We will also need to trigger this action before we merge it to ensure it is all working
57e8551
to
f71c5fb
Compare
Have you tried getting this to run on Actions so we can see it working? |
I was hoping to get the API token for the PYPi and Github steps before attempting that. Or no need for that yet? |
75500dd
to
615e798
Compare
I don't want to push to pypi yet, we need to make sure everything works before I add the token |
Yeah, I am doing that at the moment. I am testing the action workflow. |
The error on the publish job seems to be that there is no browser/geckodriver installed to run the tests on. |
5e8cd48
to
6b4e442
Compare
I have now fixed the Github action up to the point of pushing to PyPI |
e6ac679
to
728250a
Compare
export PYTHONUNBUFFERED=1 | ||
export MOZ_HEADLESS=1 | ||
export GECKODRIVER_LOG="$(pwd)/results/geckodriver.log" | ||
pytest -vvv \ | ||
--driver Firefox \ | ||
--capture=no \ | ||
--cov --cov-fail-under=95 \ | ||
--html results/report.html 2>&1 | tee results/pytest.log |
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 like make test is working now too?
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.
Yeah, exactly. But I need to ignore the non-zero exit code that is making the other CI to fail.
094adf1
to
6f2a638
Compare
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.
Just a few final comments
Makefile
Outdated
@@ -1,3 +1,7 @@ | |||
export PYTHONUNBUFFERED = 1 |
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 think we need this, I have a feeling this is not what solved our issue
@@ -1,3 +1,7 @@ | |||
export PYTHONUNBUFFERED = 1 | |||
export MOZ_HEADLESS = 1 | |||
export GECKODRIVER_LOG = $(shell pwd)/results/geckodriver.log |
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.
If we're exporting these we should capture them as an artifact, it could help with future debugging.
I think this is ready to go, lets finalize this and make sure it runs only on Tags, then we can create a Tag and get this released! |
- main | ||
push: | ||
tags: | ||
- "v*" |
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.
Lets get this to match sematic versioning.
- main | ||
push: | ||
tags: | ||
- "v*.*.*" |
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.
Check these docs for more specifics https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags
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.
We probably want something like 'v[0-9]+.[0-9]+.[0-9]+'
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 good!!
Because
This commit
Fixes #333