mirror of
https://github.com/docker/compose.git
synced 2025-07-28 16:14:06 +02:00
Merge pull request #1918 from dnephin/fix_scripts_test
Fix scripts/test and add to note about pre-commit hook to contributing
This commit is contained in:
commit
027414cfc0
@ -30,6 +30,17 @@ that should get you started.
|
|||||||
`docker-compose` from anywhere on your machine, it will run your development
|
`docker-compose` from anywhere on your machine, it will run your development
|
||||||
version of Compose.
|
version of Compose.
|
||||||
|
|
||||||
|
## Install pre-commit hooks
|
||||||
|
|
||||||
|
This step is optional, but recommended. Pre-commit hooks will run style checks
|
||||||
|
and in some cases fix style issues for you, when you commit code.
|
||||||
|
|
||||||
|
Install the git pre-commit hooks using [tox](https://tox.readthedocs.org) by
|
||||||
|
running `tox -e pre-commit` or by following the
|
||||||
|
[pre-commit install guide](http://pre-commit.com/#install).
|
||||||
|
|
||||||
|
To run the style checks at any time run `tox -e pre-commit`.
|
||||||
|
|
||||||
## Submitting a pull request
|
## Submitting a pull request
|
||||||
|
|
||||||
See Docker's [basic contribution workflow](https://docs.docker.com/project/make-a-contribution/#the-basic-contribution-workflow) for a guide on how to submit a pull request for code or documentation.
|
See Docker's [basic contribution workflow](https://docs.docker.com/project/make-a-contribution/#the-basic-contribution-workflow) for a guide on how to submit a pull request for code or documentation.
|
||||||
|
@ -10,6 +10,7 @@ set -e
|
|||||||
|
|
||||||
export DOCKER_VERSIONS=all
|
export DOCKER_VERSIONS=all
|
||||||
export DOCKER_DAEMON_ARGS="--storage-driver=overlay"
|
export DOCKER_DAEMON_ARGS="--storage-driver=overlay"
|
||||||
|
GIT_VOLUME="--volumes-from=$(hostname)"
|
||||||
. script/test-versions
|
. script/test-versions
|
||||||
|
|
||||||
>&2 echo "Building Linux binary"
|
>&2 echo "Building Linux binary"
|
||||||
|
15
script/test
15
script/test
@ -6,15 +6,10 @@ set -ex
|
|||||||
TAG="docker-compose:$(git rev-parse --short HEAD)"
|
TAG="docker-compose:$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
rm -rf coverage-html
|
rm -rf coverage-html
|
||||||
|
# Create the host directory so it's owned by $USER
|
||||||
|
mkdir -p coverage-html
|
||||||
|
|
||||||
docker build -t "$TAG" .
|
docker build -t "$TAG" .
|
||||||
docker run \
|
|
||||||
--rm \
|
GIT_VOLUME="--volume=$(pwd)/.git:/code/.git"
|
||||||
--volume="/var/run/docker.sock:/var/run/docker.sock" \
|
. script/test-versions
|
||||||
-e DOCKER_VERSIONS \
|
|
||||||
-e "TAG=$TAG" \
|
|
||||||
-e "affinity:image==$TAG" \
|
|
||||||
-e "COVERAGE_DIR=$(pwd)/coverage-html" \
|
|
||||||
--entrypoint="script/test-versions" \
|
|
||||||
"$TAG" \
|
|
||||||
"$@"
|
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
>&2 echo "Running lint checks"
|
>&2 echo "Running lint checks"
|
||||||
tox -e pre-commit
|
docker run --rm \
|
||||||
|
${GIT_VOLUME} \
|
||||||
|
--entrypoint="tox" \
|
||||||
|
"$TAG" -e pre-commit
|
||||||
|
|
||||||
if [ "$DOCKER_VERSIONS" == "" ]; then
|
if [ "$DOCKER_VERSIONS" == "" ]; then
|
||||||
DOCKER_VERSIONS="default"
|
DOCKER_VERSIONS="default"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user