Reading a file from resources not working in gitlab CI

后端 未结 1 493
悲哀的现实
悲哀的现实 2021-01-28 07:26

I am getting an error while running tests on gitlab CI using the command:

./gradlew clean test

I am using test containers to run my tests: htt

相关标签:
1条回答
  • 2021-01-28 07:42

    Based on the Testcontainers docs here. DinD service is required for Testcontainers on Gitlab CI

    Here an example:

    # DinD service is required for Testcontainers
    services:
      - docker:dind
    
    variables:
      # Instruct Testcontainers to use the daemon of DinD.
      DOCKER_HOST: "tcp://docker:2375"
      # Improve performance with overlayfs.
      DOCKER_DRIVER: overlay2
    
    test:
     image: gradle:5.0
     stage: test
     script: ./gradlew test
    
    0 讨论(0)
提交回复
热议问题