Skip to content

Commit

Permalink
Skip docker-maven-plugin completely on GitHub Action's Windows VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere authored and marko-bekhta committed Sep 20, 2023
1 parent 87721e7 commit c238284
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ jobs:
# We can't start Linux containers on GitHub Actions' Windows VMs,
# so we can't run Elasticsearch tests.
# See https://github.com/actions/runner-images/issues/1143#issuecomment-972929995
# For some reason docker-maven-plugin will error out with "All pipe instances are busy"
# on GitHub Actions' Windows VMs (when using Bash?),
# so we also explicitly disable docker-maven-plugin.
# See https://github.com/fabric8io/docker-maven-plugin/issues/548#issuecomment-255477600
- {
name: "Windows JDK 17",
runs-on: 'windows-latest',
java: {
version: 17
},
maven: {
args: '-Dtest.elasticsearch.skip=true'
args: '-Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true'
}
}
steps:
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ and run unit tests and integration tests.
```

Note: on Windows, you will need a Docker install able to run Linux containers.
If you don't have that, you can skip the Elasticsearch tests:
`./mvnw clean install -Dtest.elasticsearch.skip=true`.
If you don't have that, you can skip the Elasticsearch tests and all container startups:
`./mvnw clean install -Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true`.

Note: the produced JARs are compatible with Java 8 and later,
regardless of the JDK used to build Hibernate Search.
Expand Down Expand Up @@ -346,6 +346,12 @@ you can skip all Elasticsearch tests (and thus the Elasticsearch container start
./mvnw clean install -Dtest.elasticsearch.skip=true
```

On Windows, you might need to also skip all docker container features:

```bash
./mvnw clean install -Dtest.elasticsearch.skip=true -Dtest.containers.run.skip=true
```

Alternatively, you can prevent the build from launching an Elasticsearch server automatically
and run Elasticsearch-related tests against your own server using the
`test.elasticsearch.connection.uris` property:
Expand Down

0 comments on commit c238284

Please sign in to comment.