{"action":"created","issue":{"url":"https://api.github.com/repos/sourcecred/sourcecred/issues/189","repository_url":"https://api.github.com/repos/sourcecred/sourcecred","labels_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/189/comments","events_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/189/events","html_url":"https://github.com/sourcecred/sourcecred/pull/189","id":319723563,"number":189,"title":"Implement a custom CI script","user":{"login":"wchargin","id":4317806,"avatar_url":"https://avatars3.githubusercontent.com/u/4317806?v=4","gravatar_id":"","url":"https://api.github.com/users/wchargin","html_url":"https://github.com/wchargin","followers_url":"https://api.github.com/users/wchargin/followers","following_url":"https://api.github.com/users/wchargin/following{/other_user}","gists_url":"https://api.github.com/users/wchargin/gists{/gist_id}","starred_url":"https://api.github.com/users/wchargin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchargin/subscriptions","organizations_url":"https://api.github.com/users/wchargin/orgs","repos_url":"https://api.github.com/users/wchargin/repos","events_url":"https://api.github.com/users/wchargin/events{/privacy}","received_events_url":"https://api.github.com/users/wchargin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-02T21:46:20Z","updated_at":"2018-05-02T21:46:35Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/sourcecred/sourcecred/pulls/189","html_url":"https://github.com/sourcecred/sourcecred/pull/189","diff_url":"https://github.com/sourcecred/sourcecred/pull/189.diff","patch_url":"https://github.com/sourcecred/sourcecred/pull/189.patch"},"body":"Summary:\r\nThis CI script accomplishes two tasks:\r\n 1. It speeds up our build by parallelizing where possible.\r\n 2. It opens the possibility for running Travis cron jobs.\r\n\r\nCurrently, this script by default does the same amount of work as our\r\ncurrent CI script. However, I’d like to move `yarn backend` into the\r\nlist of basic actions: a backend build failure should fail CI.\r\n\r\nNote: this script is written to be executable directly by Node, so we\r\ncan’t use Flow types with the standard syntax. Instead, we use the\r\ncomment syntax: https://flow.org/en/docs/types/comments/\r\n\r\nTest Plan:\r\nThe following should pass with useful output:\r\n  - `npm run travis`\r\n  - `GITHUB_TOKEN=\"your_github_token\" npm run travis -- --full`\r\n\r\nThe following should fail with useful output:\r\n  - `npm run travis -- --full` (fail)\r\n\r\nTo test different failure modes, it can be helpful to add\r\n```js\r\n    {id: \"doomed\", cmd: [\"false\"], deps: []},\r\n    {id: \"orphan\", cmd: [\"whoami\"], deps: [\"who\", \"are\", \"you\"]},\r\n```\r\nto the list of `basicTasks` in `travis.js`.\r\n\r\nTo test performance:\r\n```shell\r\n$ time node ./config/travis.js >/dev/null 2>/dev/null\r\n\r\nreal    0m8.306s\r\nuser    0m20.336s\r\nsys     0m1.364s\r\n\r\n$ time bash -c \\\r\n>     'npm run check-pretty && npm run lint && npm run flow && CI=1 npm run test' \\\r\n>     >/dev/null 2>/dev/null\r\n\r\nreal    0m12.427s\r\nuser    0m13.752s\r\nsys     0m0.804s\r\n```\r\nA 50% savings is not bad at all—and the raw time saved should only\r\nimprove from here on, as the individual steps start taking more time.\r\n\r\nwchargin-branch: custom-ci"},"comment":{"url":"https://api.github.com/repos/sourcecred/sourcecred/issues/comments/386131713","html_url":"https://github.com/sourcecred/sourcecred/pull/189#issuecomment-386131713","issue_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/189","id":386131713,"user":{"login":"wchargin","id":4317806,"avatar_url":"https://avatars3.githubusercontent.com/u/4317806?v=4","gravatar_id":"","url":"https://api.github.com/users/wchargin","html_url":"https://github.com/wchargin","followers_url":"https://api.github.com/users/wchargin/followers","following_url":"https://api.github.com/users/wchargin/following{/other_user}","gists_url":"https://api.github.com/users/wchargin/gists{/gist_id}","starred_url":"https://api.github.com/users/wchargin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchargin/subscriptions","organizations_url":"https://api.github.com/users/wchargin/orgs","repos_url":"https://api.github.com/users/wchargin/repos","events_url":"https://api.github.com/users/wchargin/events{/privacy}","received_events_url":"https://api.github.com/users/wchargin/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T21:46:35Z","updated_at":"2018-05-02T21:46:35Z","author_association":"MEMBER","body":"Here is the output of a successful build:\r\nhttps://travis-ci.org/sourcecred/sourcecred/builds/374155945"}}
{"actor":{"display_login":"wchargin"}}