Commit Graph

6 Commits

Author SHA1 Message Date
Dandelion Mané 78dc571cdc
Fix flakey CI memory issues (#1230)
Ever since I upgraded all of the dependencies, we've been having
regular CI failures, which seem to share a common root cause of memory
exhaustion. Here are some examples: [1], [2].

[1]: https://circleci.com/gh/sourcecred/sourcecred/1246
[2]: https://circleci.com/gh/sourcecred/sourcecred/1239

After some experimentation, I've found that we can solve the
issue by ensuring that jest runs on its own in CI, so that it doesn't
contend with other tests for memories. Also, I reduce its max workers to
2, which matches the number of CPUs in the CircleCI containers.

Unfortunately, this does increase our build time. The postcommit (non
full) test now takes 45-60s (up from 30-50s), and the full test is also
a little slower. However, building in about one minute is still
acceptably fast, and having regular flakey test failures is not
acceptable, so this is still a win.

If we want to improve on this in the future, we should look into the git
shells getting spawned in `config/env.js`. I noticed that they were
often involved in the out-of-memory failures.

Also, I modified `.circleci/config.yml` so that any branch matching the
regular expression `/ci-.*/` will trigger a full build. That makes it
easier to test against CI failures.

Test plan: I ran about ~10 full builds with this change, and more with
similar variations, and they all passed. Verify that the full builds
that are run for this commit also all pass! Also, verify that running
yarn test locally has unchanged behavior, and running 
`yarn test --ci` locally lets jest run to completion before running
any other test.
2019-07-16 01:51:14 +01:00
Dandelion Mané ade2cc7a1d Run tests on the ci-test branch
This modifies config.yml so that it will run full tests on a branch
called "ci-test". This will make it easier for us to test attemtps to
fix full build issues, without needing to iterate against master
directly.
2019-07-11 15:16:49 +01:00
Dandelion Mané e459a82fae Test node 12 and node 10
This commit changes CI to test against node 12 and 10 instead of node 8.

I test against node 12 by default (it will be LTS soon, and it has a
number of nice improvements compared to 10). We test node10 on the
nightly and post-merge, that way we will still discover quickly if we
have a problem with node 10, but it won't slow down CI for merges.

I'm just dropping explicit support for node 8 entirely, since node 8 is
end-of-life soon (Dec 19).

Test plan: I've locally verified that `yarn test --full` passes for both
node 10 and node 12.
2019-07-09 13:09:17 +01:00
William Chargin bf35161d87
ci: run `test_full` on all merges to master (#976)
Summary:
We currently run quicktest on pull requests, quicktest again on commits
_after_ they are merged into `master`, and fulltest nightly. This commit
retains quicktest on pull requests, but switches to fulltest once a
commit is merged into master. We still run fulltest nightly as well, to
detect any changes in remote APIs that we hit.

Test Plan:
Push this commit. Check that Circle CI runs its workflow normally (as
quicktest), verifying that the config parses correctly. Then, merge this
commit, and verify that the full tests have run.

wchargin-branch: ci-test-full-on-master
2018-11-01 10:57:53 -07:00
William Chargin 3e49466ad5
ci: add "commit" and "nightly" CircleCI workflows (#906)
Summary:
This should run `yarn test` on every commit, and `yarn test --full`
on `master` once per day at 15:00 PDT/14:00 PST.

Useful documentation links:

  - <https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow>
  - <https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands>

Test Plan:
I’ve pushed this branch and verified that the “commit” workflow executes
successfully on CircleCI. To test the cron workflow, we’ll have to wait
until the daily build.

wchargin-branch: circleci-workflows
2018-10-02 10:57:33 -07:00
William Chargin e0dcce220b
ci: add CircleCI config (#899)
Summary:
CircleCI seems fast.

This config file copied from the one suggested by CircleCI, with the
following modifications: Node version changed from 7.10 to 8.12.0;
commented-out MongoDB dependency removed; capitalization error in header
comment fixed.

Test Plan:
Per the CircleCI instructions, merge this PR and then turn on the
project.

wchargin-branch: circleci-config
2018-09-28 16:58:54 -07:00