- 
                Notifications
    You must be signed in to change notification settings 
- Fork 135
Replace TravisCI with Github Actions #357
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
|  | ||
| strategy: | ||
| matrix: | ||
| python: | 
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've removed python3.5 from text matrix because jupyter_client dependency does not support it:
https://travis-ci.org/github/jupyter/kernel_gateway/jobs/766251855
from jupyter_client.channels import HBChannel
  File "/home/travis/virtualenv/python3.5.10/lib/python3.5/site-packages/jupyter_client/channels.py", line 47
    time_to_dead: float = 1.0
                ^
SyntaxError: invalid syntax
This was fixed just recently:
jupyter/jupyter_client@018d8da
So I've synced matrix with supported python versions.
Also because Python2 is not supported by this dependency at all, I've removed every mention from the repo.
| - master | ||
|  | ||
| jobs: | ||
| check_duplicate_runs: | 
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 is an annoying bug of Github Actions - when someone creates a new branch and pushes some commits here, and then creates a pull request, there are 2 copies of workflow running - one for a push event and another for created PR.
This step prevents the second copy of workflow to be run - if tests are already passed for push event then they will be not run twice while PR is created. Also they will not be run if source code hasn't been changed.
| self.assertEqual(ex.code, 401) | ||
| else: | ||
| self.assert_(False, 'no exception raised') | ||
| raise AssertionError('no exception raised') | 
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.
self.assert_ is deprecated, but replacing it with self.assertTrue(False, ...) looks ugly. So I've replaces it with just raising an exception.
|  | ||
| # Assert the reply comes back. Test will timeout if this hangs. | ||
| for _ in range(3): | ||
| for _ in range(10): | 
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.
Tests were failed with just 3 retries:
https://github.com/dolfinus/kernel_gateway/runs/2374478216?check_suite_focus=true
So I've increased this value.
| self.assertEqual(ssl_options['ssl_version'], 5) | ||
|  | ||
| def test_load_notebook_local(self): | ||
| nb_path = os.path.join(RESOURCES, 'weirdly?named#notebook.ipynb') | 
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 file name causes an error while cloning the repo on a Windows machine - NTFS does not allow to use ? in file names.
So I've renamed it.
| ASYNC_TEST_TIMEOUT: 10 | ||
|  | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v1 | 
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 new step is present in jupyter_client CI
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.
Amazing work, thank you!
| 
 Yes, agreed - thank you @dolfinus! (Thanks @blink1073 for reviewing this.) | 
TravisCI will soon become dead:
"Please be aware travis-ci.org will be shutting down in several weeks"
Let's move CI to Github Actions. Here is an example of successful workflow: https://github.com/dolfinus/kernel_gateway/actions/runs/761320926
Fixes #354