diff options
-rw-r--r-- | .github/workflows/lint-test.yaml | 46 |
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\"'" |