Skip to content

Commit

Permalink
Skip executing some plugins when skipping tests (#1418)
Browse files Browse the repository at this point in the history
* Skip some plugins when skipping tests

* Add instruction in BUILD.md to install eclair-core to repo

* Reorganize BUILD.md with subsections
  • Loading branch information
dpad85 committed May 13, 2020
1 parent f22ec21 commit 8629d20
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
35 changes: 27 additions & 8 deletions BUILD.md
Expand Up @@ -8,7 +8,7 @@

## Build

Eclair is packaged as a compressed archive with a launcher script, the archives are built deterministically
Eclair is packaged as a compressed archive with a launcher script. The archives are built deterministically
so it's possible to reproduce the build and verify its equality byte-by-byte. To build the exact same artifacts
that we release, you must use the build environment (OS, JDK, maven...) that we specify in our release notes.

Expand All @@ -18,24 +18,29 @@ To build the project and run the tests, simply run:
mvn package
```

NB: if the build fails, you may need to clean previously built artifacts with the `mvn clean` command.
NB: some of the tests use [Docker](https://www.docker.com/), so make sure your docker daemon is running.
Notes:
- This command will build all modules (core, node, gui).
- If the build fails, you may need to clean previously built artifacts with the `mvn clean` command.
- Some of the tests use [Docker](https://www.docker.com/), so make sure your docker daemon is running.
- Archives can be found in the `target` folder for each module.

### Other build options
### Skip tests

To skip all tests, run:
Running tests takes time. If you want to skip them, use `-DskipTests`:

```shell
mvn package -DskipTests
```

To only build the `eclair-node` module, run:
You can even skip the tests compilation with `maven.test.skip`:

```shell
mvn package -pl eclair-node -am -DskipTests
mvn package -Dmaven.test.skip=true
```

To run the tests, run:
### Run tests

To only run the tests, run:

```shell
mvn test
Expand All @@ -47,6 +52,20 @@ To run tests for a specific class, run:
mvn test -Dsuites=*<TestClassName>
```

### Build specific module

To only build the `eclair-node` module, run:

```shell
mvn package -pl eclair-node -am -Dmaven.test.skip=true
```

To install `eclair-core` into your local maven repository and use it in another project, run:

```shell
mvn clean install -pl eclair-core -am -Dmaven.test.skip=true
```

## Build the API documentation

### Slate
Expand Down
1 change: 1 addition & 0 deletions eclair-core/pom.xml
Expand Up @@ -43,6 +43,7 @@
<goal>wget</goal>
</goals>
<configuration>
<skip>${maven.test.skip}</skip>
<url>${bitcoind.url}</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Expand Up @@ -160,6 +160,7 @@
<goal>doc-jar</goal>
</goals>
<configuration>
<skip>${maven.test.skip}</skip>
<args>
<arg>-no-link-warnings</arg>
</args>
Expand Down Expand Up @@ -246,6 +247,7 @@
<artifactId>scoverage-maven-plugin</artifactId>
<version>1.4.0-RC1</version>
<configuration>
<skip>${maven.test.skip}</skip>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
</plugin>
Expand Down

0 comments on commit 8629d20

Please sign in to comment.