-
-
Couldn't load subscription status.
- Fork 677
tests: Move CI from Travis to GitHub Actions. #4383
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
|
Excellent, thanks! I don't see results from it shown here on this PR thread. Perhaps the workflow needs to exist on a branch in the repo itself? I'll go read some of the docs, and experiment with pushing this commit to a branch here. |
|
... Ha, OK! I:
In fact it looks like two of them: one for having pushed to a branch, and one for having made a PR from that branch. I guess because it's the same commit, it's probably showing the same runs' results on both PRs. |
|
The |
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.
Thanks @titanous ! Small comments below -- otherwise this looks great.
There's a couple of bits this drops from the config, which are good to drop because we haven't been using them but it'd be good to mention in the commit message.
|
|
||
| env: | ||
| global: | ||
| - COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv |
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 gets dropped.
That's fine, because we haven't actually been using Coveralls in this repo for several years.
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.
Noted in commit message.
| android: | ||
| components: | ||
| # all the android components used in the zulip-mobile and it's dependencies | ||
| - tools | ||
| - platform-tools | ||
| - build-tools-28.0.3 | ||
| - android-29 # corresponds to compileSdkVersion | ||
| - extra-google-m2repository | ||
| - extra-android-m2repository | ||
| - extra-google-android-support | ||
|
|
||
| licenses: | ||
| - 'android-sdk-license-.+' |
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.
Huh, all this detail goes away!
As best I can tell from that action's implementation:
https://github.com/android-actions/setup-android/blob/main/src/main.ts
it just installs all versions of the tools:
await exec.exec(
sdkManager,
['--include_obsolete', `--sdk_root=${ANDROID_SDK_ROOT}`, 'tools'],
{input: acceptBuffer}
)There seems to be no downside, though, because it's quite fast -- only takes 1s to run (and GH Actions doesn't show times at finer granularity than that.) I guess the caching must be pretty great!
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.
Noted in commit message.
|
|
||
| language: android | ||
|
|
||
| jdk: oraclejdk8 |
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 gets updated to version 11. That's for the best -- since 0e45fda we've been recommending at least that version for development, so ideally this would have been already updated 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.
Noted in commit message.
| @@ -1,46 +0,0 @@ | |||
| dist: trusty | |||
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.
Glad to be rid of this line! Don't know if you've already spotted this in the Git history, but here's the reason we've been running our Travis builds on Trusty:
commit 64e02a8
Author: Greg Price [email protected]
Date: Tue Jul 23 14:53:47 2019 -0700
travis: Stay on working Trusty, while "xenial" is really Precise.
Fixes #3565.
Travis CI is migrating their default build environments from
14.04 Trusty to 16.04 Xenial. That's more than reasonable --
Trusty went EOL a few months ago.
But for Android they don't yet have a Xenial image. And when you
request a Xenial image for Android... what you actually get turns
out to be a *12.04 Precise* image. Which went EOL over two years
ago, and which naturally things don't always run on.
[…]
Fix it by explicitly sticking with Trusty, as the least-ancient
option available.
More details in the issue thread #3565. I also just reported the
issue to Travis on their forum:
https://travis-ci.community/t/android-builds-default-to-precise-which-is-2-years-eol/4352
It looks like currently ubuntu-latest on GH Actions means 18.04 Bionic, and presumably at some point it'll start meaning 20.04 Focal. Sounds good.
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.
Noted in commit message.
| notifications: | ||
| email: false | ||
| webhooks: | ||
| urls: | ||
| - https://zulip.org/zulipbot/travis | ||
| on_success: always | ||
| on_failure: always |
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 gets dropped.
That's fine, because we don't have zulipbot actually doing anything with these notifications, and haven't for years.
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.
Noted in commit message.
| - name: Run yarn install | ||
| uses: bahmutov/npm-install@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.
Huh, does this actually -- huh, I guess this does indeed use Yarn!
Probably deserves a one-line comment to acknowledge that yes, the name sounds like it does npm install, but it actually does yarn install.
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.
Noted in comment.
| # See the mention of `inotify` in docs/. If we attempt assembleRelease, | ||
| # then without this line the JS bundle step fails with a baffling ENOSPC | ||
| # error, even though there's tons of free space on the filesystem. | ||
| - echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
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 bit goes away. Here's the commit that added it (and nothing else):
commit 65882db
Author: Greg Price [email protected]
Date: Wed Nov 14 17:59:19 2018 -0800
travis: Add incantation to fix release build (but don't actually do it.)
With this rather arcane, but harmless, command, the mysterious ENOSPC
error caused in Travis by switching to the release build no longer
happens, and the build completes successfully.
On the downside, the build is about 4 minutes longer -- over 50%
longer -- than with the debug build. That JS bundle step is *slow* in
Travis. So although it works, it's not worth the time penalty to do
on every PR; we'll leave it on debug.
We may sometimes want to turn it on in the future, though. So leave
this here to prevent repeating this debugging session.
I think that's still a good reason to keep it in. In fact now that we'll be on GH Actions, I think it becomes more likely that we'll try re-adding a release build. We'd do it as a separate job running in parallel, I 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.
Added a comment with this info. Given that it will run in a separate job, I don't think we need to actually run the command in the current config.
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, makes sense.
.github/workflows/ci.yml
Outdated
| with: | ||
| node-version: '12' | ||
| check-latest: 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.
nit: whitespace at end of line
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.
Fixed.
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.
Hmm, it seems like it wasn't. But easy for me to fix before merge 🙂
Ah, good to know. In our usual workflow we don't push to branches here -- we each push feature branches to our respective personal forks and send those as PRs. So I think that means that typically |
|
After the small changes discussed above and after we merge this, If you're interested, I think there's a couple of followups this opens up that would potentially make the CI significantly faster and nicer than it's ever previously been:
|
b279912 to
87ab409
Compare
|
Thanks for the detailed review!
The |
The configuration is similar, with these changes: - Update from Java 8 to Java 11, the recommended version for development - Update from Ubuntu 14.04 to 18.04 (and eventually 20.04 automatically) - Rely on the setup-android action to provide all versions of the tools - Remove unused Zulipbot webhook - Remove unused Coveralls token Fixes: zulip#4174
87ab409 to
7dfa1c2
Compare
|
And merged 🎉 -- thanks! I made some small whitespace changes, and small edits to the commit message -- mostly just wrapping it to within 70 columns. |
Hmm! That'd make sense, but... it looks like that step took 1m29s on the run after your update. That's about as long as it was on the previous revision (1m35s), and seems like long enough to install the node_modules from scratch. Maybe the cache will only work after there's a version in master? I guess we'll find out. If it continues to not benefit from caching, then I guess we'll want to debug. |

This configuration is equivalent, except that Ubuntu and Java are updated to the latest LTS releases.
Fixes: #4174