hubotio / hubot

A customizable life embetterment robot.

Home Page:https://hubotio.github.io/hubot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move from Travis CI to Github Actions

xurizaemon opened this issue · comments

Github Actions is capable of executing the same tests in a more integrated fashion. In the (brief) fork to hubot-new/hubot we moved to Github Actions to execute tests, and it's worked well.

This issue serves to discuss and document that change in hubotio/hubot, and thinking around test coverage in Github Actions.

WRT test run time and appropriate coverage for PRs, https://github.com/hubot-new/hubot/pull/66 has timings for an OS/Node version matrix. In hubot-new/hubot#44 I noticed a jump in test run time when adding coverage for Windows, and at the time opted to move Windows + MacOS tests to schedule for quicker feedback.

I was looking into why Travis wasn't running, and I think it has to do with changes how Travis is implemented (ie GitHub Apps), and changes to their free plans (they are now only a trial, valid for 30 days).

"Current" Travis CI configuration for reference:

hubot/.travis.yml

Lines 1 to 27 in 3ebc399

language: node_js
node_js:
- "10"
- "8"
- "6"
notifications:
email: false
sudo: false
addons:
apt:
packages:
- expect
before_install:
- npm install -g npm@latest
before_script:
- npm prune
- bin/e2e-test.sh
after_success:
- npm run coverage
branches:
except:
- /^v\d+\.\d+\.\d+$/
deploy:
provider: script
skip_cleanup: true
script:
- npx travis-deploy-once "npx semantic-release"

The main thing missing from the Actions config is that e2e test.

GitHub Actions are running now. I think the main things remaining would be:

  • capture anything else in .travis-yml, ie bin/e2e-test.sh
  • remove .travis.yml

Another thing:

  • Remove badge in README:
    [![Build Status](https://travis-ci.org/hubotio/hubot.svg?branch=master)](https://travis-ci.org/hubotio/hubot) [![Coverage Status](https://coveralls.io/repos/github/hubotio/hubot/badge.svg?branch=master)](https://coveralls.io/github/hubotio/hubot?branch=master)

running bin/e2e-test.sh locally results in the following messages:

No history available
e2etest> [Sat Apr 22 2023 21:21:38 GMT-0500 (Central Daylight Time)] WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 (https://github.com/github/hubot-scripts/issues/1113) in favor of packages for each script.

Your hubot-scripts.json is empty, so you just need to remove it.
[Sat Apr 22 2023 21:21:38 GMT-0500 (Central Daylight Time)] INFO hubot-redis-brain: Using default redis on localhost:6379
(node:30660) [DEP0128] DeprecationWarning: Invalid 'main' field in '/var/folders/sp/pz36f8zx0f327symn0fpwmyc0000gn/T/tmp.wcqhoJIe/node_modules/hubot-help/package.json' of 'index.coffee'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
[Sat Apr 22 2023 21:21:38 GMT-0500 (Central Daylight Time)] ERROR hubot-heroku-keepalive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web.url | cut -d= -f2)`

e2etest> e2etest ping
e2etest> PONG
~/src/hubotio/hubot
  • main field in hubot-help/package.json of index.coffee is deprecated
  • hubot-heroku-keepalive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. Should probably remove that module?
  • Do we need to update thegenerator-hubot?

As of #1621 .travisci.yml has been removed and we're using Github Actions. Closing!

(No, I haven't tried nektos/act yet @joeyguerra)