First off - thank you for contributing to Cucumber!
This monorepo contains various components (libraries) used by Cucumber, such as:
- The Gherkin parser
- The Cucumber Expressions engine
- The Tag Expressions parser
- The Cucumber Protocol messages
- ...and a few more bits and bobs.
The Cucumber implementations themselves live in separate Git repositories:
- cucumber-jvm
- cucumber-ruby
- cucumber-js
- SpecFlow
- And various other implementations
The libraries in this monorepo are implemented in many different languages (Java, TypeScript, Ruby, C# and a few more).
You have a few options for building this repo as outlined below.
You need a lot of various tools to build this repo, and to make this easy we have created a docker image with all the required build tools installed. To use this you need Docker installed, and a bash shell on your host OS:
./scripts/docker-run Dockerfile
make clean
NO_CROSS_COMPILE=1 make
You can leave out NO_CROSS_COMPILE=1
to cross-compile go executables, but this
will slow down your build.
The build will take a while the first time you run it, but subsequent calls to make
should be a lot faster because downloaded files will be cached, and make
will
only rebuild packages that you have changed.
The git repo is mounted as a volume in the running Docker container, so you can edit files with your favourite IDE/editor on the host OS.
If you are only making changes to a particular package, you can build just that
package by changing into the relevant directory and running make
.
The benefit of building in Docker is that you don't need to install anything (except for Docker). The downside is that the build is slower than running on your host OS.
If you contribute regularly to Cucumber we recommend installing all the required
tools on your host OS. You can find a list of those tools by looking at Dockerfile
.
The build process is the same as within Docker, except that you run your commands on the host OS.
make clean
make
Whenever you push code to this repo, or create a pull request, CircleCI will build your code.
CircleCI will build the packages in parallel, so a full build will complete a lot faster than a local build.
Define PACKAGES
and/or LANGUAGES
to only build a subset of packages / languages.
Examples:
LANGUAGES=javascript make
LANGUAGES="javascript ruby" make
PACKAGES="messages gherkin" make
If you prefer to use yarn instead of npm:
NPM=yarn LANGUAGES=javascript make
You may encounter timeouts or errors when building some npm modules. If this happens,
try building the module with yarn (NPM=yarn
- see above).
If you're still experiencing errors or timeouts, try replacing file:../..
dependencies
in package.json
with the latest release of the package. If you do, please do not
commit that change.
Some files in the repo are encrypted git-crypt.
Look inside /.gitattributes
to find out which ones.
Releases can only be made when these files are decrypted. See RELEASE_PROCESS.md for details.