Skip to content

Commit

Permalink
Move pylint to use docker, modify pre-commit ci
Browse files Browse the repository at this point in the history
  • Loading branch information
smartspot2 committed Jan 26, 2024
1 parent 84bf3ec commit 2f54de5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
- name: Parse Python version from runtime.txt
run: |
sed 's/[^0-9.]//g' runtime.txt | head > .python-version
- name: Set up Pylint pre-commit
run: |
# remove all instances of docker compose exec; github CI doesn't use docker
sed -E 's/docker compose exec -T \w+\s*//g' .pre-commit-config.yaml > .pre-commit-config-ci.yaml
mv .pre-commit-config-ci.yaml .pre-commit-config.yaml
touch .env # ensure .env file exists
- name: Set up Python
uses: actions/setup-python@v4
- name: Install Poetry
Expand All @@ -29,7 +35,7 @@ jobs:
installer-parallel: true
- name: Install dependencies with Poetry
run: |
poetry install --no-root --with=dev --no-interaction --no-ansi
poetry install --no-root --with=prod --no-interaction --no-ansi
# add virtual environment to path for future steps
echo $(poetry env info --path)/bin >> $GITHUB_PATH
- name: Install npm dependencies
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
hooks:
- id: pylint
name: pylint
entry: pylint
entry: docker compose exec -T django pylint
language: system
types: [python]
args: [
Expand Down

0 comments on commit 2f54de5

Please sign in to comment.