GitHub Actions 上 Windows 环境中的测试容器:“找不到有效的 Docker 环境请查看日志并检查配置”

问题描述

我们在 testcontainers-java 项目中大量使用 spring-boot-admin。由于我们还希望能够在 Windows 上运行我们的 Maven 构建,因此我们使用矩阵策略构建 (as supposed in this answer) 向我们的 GitHub 操作管道添加了一个 windows-latest 环境,如下所示:

name: build

on:
  push:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest,windows-latest]

    runs-on: ${{ matrix.os }}
    steps:

      - uses: actions/checkout@v2

      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Build with Maven
        run: |
          mvn -B install --no-transfer-progress

现在我们的 Testcontainers JUnit 测试用例失败(参见 full build log):

[INFO] Running de.codecentric.boot.admin.server.eventstore.HazelcastEventStoreWithClientConfigTest
Error:  Tests run: 1,Failures: 0,Errors: 1,Skipped: 0,Time elapsed: 0.877 s <<< FAILURE! - in de.codecentric.boot.admin.server.eventstore.HazelcastEventStoreWithClientConfigTest
Error:  de.codecentric.boot.admin.server.eventstore.HazelcastEventStoreWithClientConfigTest  Time elapsed: 0.877 s  <<< ERROR!
java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration

那么知道我们可以做些什么来解决这个问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)