Skip to content

Commit

Permalink
Fix linting config
Browse files Browse the repository at this point in the history
  • Loading branch information
TvanWalen committed Mar 18, 2024
1 parent 4716300 commit beafe4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/linting_and_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ name: CI Checks

on:
pull_request:
branches: main
branches:
- main
- azure

jobs:
linting-and-tests:
name: Linting and tests
uses: amsterdam/github-workflows/.github/workflows/CI.yml@v1
with:
check_linting: false # Requires Makefile target "lint"
check_linting: true # Requires Makefile target "lint"
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ CMD ["./manage.py", "runserver", "0.0.0.0"]
FROM dev as tests

USER datapunt
WORKDIR /src
COPY pyproject.toml /.

ENV COVERAGE_FILE=/tmp/.coverage
ENV PYTHONPATH=/src

CMD ["pytest"]
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,15 @@ bash: ## Run the container and start bash
test: ## Execute tests
$(run) test pytest $(ARGS)

# TODO: Add lint and fixlint commands to replace linting in test

lint: ## Execute lint checks
$(run) test autoflake . --check --recursive --quiet
$(run) test isort --diff --check /src/$(APP)

lintfix: ## Execute lint fixes
$(run) test black /src/$(APP)
$(run) test autoflake /src --recursive --in-place --remove-unused-variables --remove-all-unused-imports --quiet
$(run) test isort /src/$(APP)


lint: ## Execute lint checks
$(run) test autoflake /src --check --recursive --quiet
$(run) test isort --diff --check /src/$(APP)

clean: ## Clean docker stuff
$(dc) down -v

Expand Down

0 comments on commit beafe4c

Please sign in to comment.