Skip to content

Commit fa2f689

Browse files
authored
Merge pull request #120 from mboersma/use-python-dev
feat(Makefile): run style tests in container
2 parents 8eb4428 + a2bbd90 commit fa2f689

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ services:
99
env:
1010
- DOCKER_BUILD_FLAGS="--pull --no-cache"
1111
sudo: required
12-
install:
13-
- pip install -r rootfs/dev_requirements.txt
1412
script:
1513
- make test docker-build

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
SHORT_NAME := dockerbuilder
2-
DEIS_REGISTY ?= quay.io/
2+
DEIS_REGISTRY ?= quay.io/
33
IMAGE_PREFIX ?= deis
44

55
include versioning.mk
66

7+
DEV_ENV_IMAGE := quay.io/deis/python-dev:v0.1.0
8+
DEV_ENV_WORK_DIR := /app
9+
DEV_ENV_PREFIX := docker run --rm -v ${CURDIR}/rootfs:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
10+
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
11+
712
# For cases where we're building from local
813
docker-build:
914
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
1015
docker tag ${IMAGE} ${MUTABLE_IMAGE}
1116

12-
setup-venv:
13-
@if [ ! -d venv ]; then pyvenv venv && source venv/bin/activate; fi
14-
pip install --disable-pip-version-check -q -r rootfs/dev_requirements.txt
15-
1617
test: test-style test-functional
1718

1819
test-style:
19-
cd rootfs && flake8 --show-source --config=setup.cfg .
20+
${DEV_ENV_CMD} flake8 --show-source --config=setup.cfg .
2021

2122
test-functional:
2223
@echo "Implement functional tests in _tests directory"
2324

24-
.PHONY: all build docker-compile kube-up kube-down deploy
25+
.PHONY: all docker-build test test-style test-functional

rootfs/dev_requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)