aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-11-16 23:41:44 +0100
committerGravatar Sebastiaan Zeeff <[email protected]>2020-11-16 23:41:44 +0100
commit68da60fad1296a63f6c6820d716d98c8c2e3dfe9 (patch)
treed5f75ab214c964f8d86000aedb2deadcd76b05fe
parentEnable BuildKit caching on images (diff)
Run linter in docker container
-rw-r--r--.github/workflows/lint-test.yaml46
1 files changed, 24 insertions, 22 deletions
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml
index 135e5e5..f9ab661 100644
--- a/.github/workflows/lint-test.yaml
+++ b/.github/workflows/lint-test.yaml
@@ -27,6 +27,7 @@ jobs:
run: "docker build \
-f docker/base.Dockerfile \
-t ghcr.io/python-discord/snekbox-base:latest \
+ --cache-from ghcr.io/python-discord/snekbox-base:latest \
--build-arg BUILDKIT_INLINE_CACHE=1 \
."
@@ -37,31 +38,32 @@ jobs:
run: "docker build \
-f docker/venv.Dockerfile \
-t ghcr.io/python-discord/snekbox-venv:latest \
+ --cache-from ghcr.io/python-discord/snekbox-venv:latest \
--build-arg BUILDKIT_INLINE_CACHE=1 \
."
- name: Show Containers
run: docker image ls
-# - name: Start Container
-# run: 'docker run \
-# --tty \
-# --detach \
-# --name snekbox_test \
-# --privileged \
-# --hostname pdsnk-dev \
-# -e PYTHONDONTWRITEBYTECODE=1 \
-# -e PIPENV_PIPFILE="/snekbox/Pipfile" \
-# -e ENV="${PWD}/scripts/.profile" \
-# --volume "${PWD}":"${PWD}" \
-# --workdir "${PWD}"\
-# --entrypoint /bin/bash \
-# pythondiscord/snekbox-venv:latest'
-#
-# - name: Install dependencies
-# run: "docker exec snekbox_test /bin/bash -c \
-# 'pipenv install --system --deploy --dev'"
-#
-# - name: Run linter
-# run: "docker exec snekbox_test /bin/bash -c 'flake8 \
-# --format \"::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s\"'"
+ - name: Start Container
+ run: 'docker run \
+ --tty \
+ --detach \
+ --name snekbox_test \
+ --privileged \
+ --hostname pdsnk-dev \
+ -e PYTHONDONTWRITEBYTECODE=1 \
+ -e PIPENV_PIPFILE="/snekbox/Pipfile" \
+ -e ENV="${PWD}/scripts/.profile" \
+ --volume "${PWD}":"${PWD}" \
+ --workdir "${PWD}"\
+ --entrypoint /bin/bash \
+ pythondiscord/snekbox-venv:latest'
+
+ - name: Install dependencies
+ run: "docker exec snekbox_test /bin/bash -c \
+ 'pipenv install --system --deploy --dev'"
+
+ - name: Run linter
+ run: "docker exec snekbox_test /bin/bash -c 'flake8 \
+ --format \"::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s\"'"