Commit 0746c1ac authored by Georgios Konstantopoulos's avatar Georgios Konstantopoulos Committed by GitHub

docs: clarify integration test (#49)

* docs: clarify integration test

* chore: remove unused ops/readme.md

* chore: add contributing.md

* chore: syntax highlighting

* chore: fix typos in contributing.md
parent 18c122de
This diff is collapsed.
...@@ -57,6 +57,8 @@ you can run `yarn lerna run test --parallel --since master` ...@@ -57,6 +57,8 @@ you can run `yarn lerna run test --parallel --since master`
### Integration Tests ### Integration Tests
#### Running the integration tests
The integration tests first require bringing up the Optimism stack. This is done via The integration tests first require bringing up the Optimism stack. This is done via
a Docker Compose network. For better performance, we also recommend enabling Docker a Docker Compose network. For better performance, we also recommend enabling Docker
BuildKit BuildKit
...@@ -66,5 +68,31 @@ cd ops ...@@ -66,5 +68,31 @@ cd ops
export COMPOSE_DOCKER_CLI_BUILD=1 export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1 export DOCKER_BUILDKIT=1
docker-compose build docker-compose build
docker-compose up docker-compose up -d
cd ../integration-tests
yarn test:integration
```
#### Locally testing and re-building specific services
If you want to make changes to any of the containers, you'll have to bring one down,
rebuild it, and then bring it back up.
For example, if you make a change in l2geth:
```bash
cd ops
docker-compose stop -- l2geth
docker-compose build -- l2geth
docker-compose start l2geth
```
For the typescript services, you'll need to rebuild the `builder` so that the compiled
files are re-generated, and then your service, e.g. for the batch submitter
```bash
cd ops
docker-compose stop -- batch_submitter
docker-compose build -- builder batch_submitter
docker-compose start batch_submitter
``` ```
# Optimism Operations
## Building the images
It is recommended to use Docker BuildKit and Docker Compose CLI Build to
improve the container build times. You can do that as follows:
```
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
```
For your best experience, we also recommend aliasing
## Bringing up a network
You can bring up an optimism network with the following command:
```
docker-compose up
```
You can use standard docker-compose commands for managing the containers, e.g.
getting only the logs of `l2geth`: `docker-compose --follow l2geth`
## Docker Containers
Under `docker/` you will find all the docker containers we use. In particular,
`Dockerfile.monorepo` implements a multi-stage docker build in order to cache as many
installation steps as possible to save time.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment