# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # To use docker-compose for running the test environment you must # create a `.env` file with the following contents: # UID= # GID= # DOCKER_GID= # # To create the `.env` file, you can run: # `$ ./run env > .env` # # Here is an example of my `.env` file at time of writing: # UID=1000 # GID=1000 # DOCKER_GID=975 # # The environment may be built by running: # `$ docker-compose build` # # Non-docker tests may be run with: # `$ docker-compose run --rm test-runner` # # The test-runner docker image runs `./create-environment test` # with NO_DOCKER=1, since that relys on the host docker daemon. # The containers for docker tests can be built by running: # `$ docker-compose run --rm test-runner ./d0cker build-all` # # The full test-suite with docker tests can be run with: # `$ docker-compose run --rm test-runner /vct/run-tests` version: '3' services: test-runner-py2: build: context: ./ dockerfile: ./testing/docker/test-runner-py2/Dockerfile args: USER_ID: ${UID} GROUP_ID: ${GID} DOCKER_GID: ${DOCKER_GID} image: vct-test-runner-py2:built command: ["/app/vct/run-tests", "--no-docker"] network_mode: "host" user: vct environment: - PYTHONUNBUFFERED=1 - USER=vct volumes: - ./:/app/vct - test_runner_cache_py2:/app/vct/.cache - /var/run/docker.sock:/var/run/docker.sock test-runner: build: context: ./ dockerfile: ./testing/docker/test-runner/Dockerfile args: USER_ID: ${UID} GROUP_ID: ${GID} DOCKER_GID: ${DOCKER_GID} image: vct-test-runner:built command: ["/app/vct/run-tests", "--no-docker"] network_mode: "host" user: vct environment: - PYTHONUNBUFFERED=1 - USER=vct volumes: - ./:/app/vct - test_runner_cache:/app/vct/.cache - /var/run/docker.sock:/var/run/docker.sock volumes: test_runner_cache_py2: test_runner_cache: