Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pylint/pre-commit configuration #463

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading