Skip to content

chore(ci): Migrate CI jobs to circleci#2096

Merged
rpl merged 4 commits into
mozilla:masterfrom
rpl:ci/migrate-to-circleci
Dec 17, 2020
Merged

chore(ci): Migrate CI jobs to circleci#2096
rpl merged 4 commits into
mozilla:masterfrom
rpl:ci/migrate-to-circleci

Conversation

@rpl

@rpl rpl commented Dec 17, 2020

Copy link
Copy Markdown
Member

This pull requests includes the changes needed to migrate our CI jobs from Travis CI to CircleCI:

  • new CircleCI workflow config (./circleci/config.yml), the workflow is organized as follows:

    • some notes about the CircleCI environment to set on the project (currently only NPM_TOKEN) and how to validate changes to the workflow file locally using the circleci command
    • references.nodejs_version is the set of nodejs version we run the tests on, these are the only properties of the workflow that needs to be updated to change the nodejs versions tested (without having to mess with the job definition and risk to break some by mistake)
    • a set of parametrized commands are used to reuse a set of steps in multiple jobs without duplicating too much stuff
    • a set of pre-configured jobs (one for the steps running on a linux container and one for the windows regression tests)
    • a predefined workflow with 5 job:
      • build-nodejs-current: run the full test suite (included additional steps for the functional tests), collect and publish coverage, persist build to reuse in release_tag job
    • build-nodejs-next and build-nodejs-experimental: run the full test suite, without flow-checks, coverage collection and running the functional tests only once in npm production mode
    • test-windows: run unit test and functional tests on windows (to catch windows-only regressions), skip flow-checks, coverage collection. This job does also retry once the functional tests if they fail (they used to be intermittent on travis windows workers)
    • release_tag: rebuild in production mode and release the new version on npm
  • small changes to scripts used in CI jobs to adapt them to the CircleCI environment (in particular script/travis-pr-title-lint has been adapted to use the CIRCLE_PULL_REQUEST environment var).

  • migrated from coveralls to codecov (because coveralls would require a token which we can't expose to pull requests jobs)

Testing notes:

  • the workflow file has been validated (and executed locally on docker to test the expected behaviors, besides the windows job)
  • the release_tag job has been tested on a separate isolated test project, to double-check that the job does publish the npm package successfully as expected

@rpl rpl force-pushed the ci/migrate-to-circleci branch 7 times, most recently from 45dcd83 to b4b9c5b Compare December 17, 2020 15:24
Comment thread .circleci/config.yml
@rpl rpl force-pushed the ci/migrate-to-circleci branch 4 times, most recently from f4bbde6 to 425e88b Compare December 17, 2020 16:56
@rpl rpl force-pushed the ci/migrate-to-circleci branch 3 times, most recently from 3041baf to fc28fd9 Compare December 17, 2020 17:25
@codecov-io

codecov-io commented Dec 17, 2020

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@335f0f1). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             master     #2096   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?        32           
  Lines             ?      1567           
  Branches          ?         0           
==========================================
  Hits              ?      1567           
  Misses            ?         0           
  Partials          ?         0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 335f0f1...b591a71. Read the comment docs.

@mozilla mozilla deleted a comment from coveralls Dec 17, 2020
@rpl rpl force-pushed the ci/migrate-to-circleci branch from fc28fd9 to 3ff9306 Compare December 17, 2020 17:38
@rpl

rpl commented Dec 17, 2020

Copy link
Copy Markdown
Member Author

All the circleci jobs looks finally good now (included the windows one), it does submit the coverage data to codecov and I've just applied the last small "circleci"-related tweak to the script that lint the pull request message (which does make us sure that it does follows the conventions expected by the changelog generator utility when there is more than one commit in a repo9)

\o/

@muffinresearch @willdurand This should now be good to go, any additional review comments to cover before I'll merge this?

@willdurand willdurand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+wc

Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated
Comment thread .circleci/config.yml Outdated
@rpl rpl force-pushed the ci/migrate-to-circleci branch from 3ff9306 to b591a71 Compare December 17, 2020 19:05

@muffinresearch muffinresearch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to get this up and running Luca 👍

Comment thread scripts/lib/mocha.js
const config = require('./config');

// Get the explicit path (needed on travis windows workers).
// Get the explicit path (needed on CI windows workers).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call on generalizing.

@rpl rpl merged commit 42df7f2 into mozilla:master Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms

4 participants