-
Notifications
You must be signed in to change notification settings - Fork 49
WIP: Migrate some test jobs to GitHub actions. Refs #192 #201
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
Conversation
Example of the latest test execution: atodorov#1 |
56931cd
to
c751b51
Compare
@frozencemetery, @aiudirog - can you check this out and comment on it? I'd like to move this into a state where I can enable wheel building for Linux. |
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.
Sure, I was going to wait until you had marked it not WIP.
A couple nits inline. In general, I think our goal here should be to retire Travis integration as much as possible. This means that CI scripts should probably not be in a directory with "travis" in the name at the end.
It also means that everything should move - this includes the deployments. The hard part, as it were :) I recognize this isn't really going to be doable without the credentials, but if you can get it to a point where you think things will likely work, I can take it from there. Improvements exist on the status quo in this area - from not using hacky scripts for deployment to only building once per platform - but none of that's required.
Finally, I'm probably going to squash this into a single commit, if that makes your development any easier. (Then we can handle Linux wheels as a separate change.)
.github/workflows/run-on-linux.sh
Outdated
@@ -0,0 +1,6 @@ | |||
#!/bin/bash -ex | |||
|
|||
sudo sed -i '1i 127.0.0.1 test.box' /etc/hosts; |
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 know these were in the original, but we can lose the semicolons here.
@@ -78,7 +78,7 @@ setup::macos::install() { | |||
|
|||
setup::windows::install() { | |||
# Install the right Python version and MIT Kerberos | |||
choco install python"${PYENV:0:1}" --version $PYENV | |||
choco install python"${PYENV:0:1}" --version $PYENV || true |
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.
Question on this - do we know what's actually gone wrong here? I see the error logs, and it seems Windows passess...
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.
From the log linked in the commit log:
Progress: Downloading python3 3.8.1... 100%
python3 v3.8.1 [Approved]
python3 package files install completed. Performing other installation steps.
Installing 64-bit python3...
WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\python3_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error.
ERROR: Running ["C:\ProgramData\chocolatey\lib\python3\tools\python-3.8.1-amd64.exe" /quiet InstallAllUsers=1 PrependPath=1 TargetDir="C:\Python38" ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\python3_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
The install of python3 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
More that I could find on this particular error code:
https://support.microsoft.com/en-us/help/834484/you-receive-an-error-1603-a-fatal-error-occurred-during-installation
I have seen something similar when testing on Windows (AppVeyor, GitHub CI) but installing msi files directly, not via Chocolatey. The ones I've seen have always been an installer which wants to reboot the system. IIRC Python's installer wants to reboot Windows so that changes to %PATH% are taken into account (or something along those lines).
The exit code from choco here is not 0 so I'm ignoring it, otherwise we can't proceed.
- rename .travis/ -> .ci/ - use a small script for running the test job b/c GitHub's parser doesn't support yaml anchors, see: https://github.community/t5/GitHub-Actions/Support-for-YAML-anchors/m-p/30336 - do not fail on Python installs in Windows environment, for example: https://github.com/atodorov/python-gssapi/pull/1/checks?check_run_id=601883334. Likely caused by the Python installer wanting to reboot Windows
@frozencemetery I have hit a snag here and need an advice. Travis CI supports stages and the jobs in a certain stage will execute only after the ones before have all passed. This ensures that docs and/or artifacts are deployed only if the tests before them pass. Stages are keyed off based on branch name or tags. GitHub actions doesn't support stages but does support job dependencies where you've got to list all of the previous jobs the current one depends on, see https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds. However this appears to be valid if all related jobs are defined in the same file, so GitHub does support specifying when a specific workflow should be executed, see https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags and the current specification in both yml files in this PR. This is on a per workflow level though, not per job. I can use conditionals for every job but combined with the fact that each deployment job must specify all of the test jobs as dependencies makes all of this very fragile. There is also another trigger for workflows which is based on specific events, see: From these 2 I can point out:
I'll make an independent experiment with the last one b/c it sounds most promising. However the question still remains - do you want to complicate things and only deploy when tests are passing or potentially deploy bogus docs/artifacts in case somebody tags a bad version (much more easier to model with the new syntax) ? |
Hmm. I'll allocate some time to play with it this week and see if I can figure out a way forward. NEEDINFO(me) :) |
(Superseded by #204) |
Linux test jobs look fine except the fact that GitHub doesn't seem to support yaml anchors.
edit: Windows jobs PASS with the last commit, but I'm not entirely confident the specified Python version is used. I see references to the Python version installed with Visual Studio.
MacOS test job fails with
./.travis/lib-setup.sh: line 72: pyenv: command not found
.For the list of installed software check here:
https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md