aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ToxicKidz <[email protected]>2021-05-18 23:06:22 -0400
committerGravatar ToxicKidz <[email protected]>2021-05-18 23:06:22 -0400
commit3058f377e3bacdbaafd6142e2b937e406c88be80 (patch)
treef44e9f83dc493291470d131fafa4d91310215283
parentchore: Fix some typos (diff)
Add a step to lint-test to show pre-commit logs
-rw-r--r--.github/workflows/lint-test-build-push.yaml7
-rw-r--r--docker-compose.yml2
2 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/lint-test-build-push.yaml b/.github/workflows/lint-test-build-push.yaml
index 92ca53e..7b862ec 100644
--- a/.github/workflows/lint-test-build-push.yaml
+++ b/.github/workflows/lint-test-build-push.yaml
@@ -95,10 +95,17 @@ jobs:
# pre-commit's venv doesn't work with user installs.
# Skip the flake8 hook because the following step will run it.
- name: Run pre-commit hooks
+ id: run-pre-commit-hooks
run: >-
docker exec snekbox_dev /bin/bash -c
'PIP_USER=0 SKIP=flake8 pre-commit run --all-files'
+ - name: Show pre-commit logs
+ if: always() && steps.run-pre-commit-hooks.outcome != 'success'
+ run: >-
+ docker exec snekbox_dev /bin/bash -c
+ 'cat /root/.cache/pre-commit/pre-commit.log'
+
# This runs `flake8` in the container and asks `flake8` to output
# linting errors in the format of the command for registering workflow
# error messages/annotations. This means that Github Actions will pick
diff --git a/docker-compose.yml b/docker-compose.yml
index e962524..f546024 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -24,7 +24,7 @@ services:
cache_from:
- ghcr.io/python-discord/snekbox:latest
volumes:
- - .:/snekbox
+ - $PWD:$PWD
- user-base:/snekbox/user_base
volumes: