-
-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor tool to support external settings #9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8d02cf6
WIP: Run all checks
ericof cf069a2
Implement settings from pyproject.toml
ericof 22ef7ab
Update README.
ericof e3c5da4
Implement debug options to the image
ericof 5e86855
Change Dockerfile layer order
ericof 5955ca1
Improve debugging for settings file detection.
ericof 6e949c7
Improve paths detections in docker-entrypoint.py
ericof 65f4d69
Small refactoring
ericof 554be2c
Report stderr and stdout when returncode is not 0
ericof 0ffc12a
Add formatter examples
ericof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| .git | ||
| .github | ||
| __pycache__ | ||
| .*project | ||
| .pytest_cache | ||
| .vscode | ||
| docs/ | ||
| /.settings/ | ||
| /tests | ||
| bin | ||
| Dockerfile | ||
| docs/ | ||
| include | ||
| lib | ||
| lib64 | ||
| LICENSE.txt | ||
| Makefile | ||
| README.md | ||
| README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Test codebase | ||
|
|
||
| on: push | ||
|
|
||
| jobs: | ||
|
|
||
| tests: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: "3.10" | ||
|
|
||
| - name: Install requirements | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install -r tests/requirements.txt | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| python -m pytest tests/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| __pycache__ | ||
| .*project | ||
| .pytest_cache | ||
| .vscode | ||
| /.settings/ | ||
| .*project | ||
| bin | ||
| include | ||
| lib | ||
| lib64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,26 @@ | ||
| FROM python:3.10-slim | ||
| FROM python:3.10-slim as base | ||
| FROM base as builder | ||
|
|
||
| RUN pip install -U pip wheel \ | ||
| && mkdir /app /wheelhouse | ||
|
|
||
| COPY requirements.txt /app/ | ||
| COPY src /app/src | ||
|
|
||
| RUN cd /app/ && pip wheel -r requirements.txt --wheel-dir=/wheelhouse | ||
|
|
||
| FROM base | ||
|
|
||
| LABEL maintainer="Plone Community <dev@plone.org>" \ | ||
| org.label-schema.name="code-quality" \ | ||
| org.label-schema.description="Plone code quality tool" \ | ||
| org.label-schema.vendor="Plone Foundation" \ | ||
| org.label-schema.docker.cmd="docker run -rm -v "${PWD}":/github/workspace plone/code-quality check black src" | ||
|
|
||
| COPY requirements.txt pyproject.toml docker-entrypoint.py ./ | ||
|
|
||
| RUN pip install -U pip && pip install -r requirements.txt | ||
|
|
||
| WORKDIR /github/workspace | ||
|
|
||
| ENTRYPOINT [ "/docker-entrypoint.py" ] | ||
|
|
||
| COPY docker-entrypoint.py / | ||
| COPY --from=builder /wheelhouse /wheelhouse | ||
| RUN pip install --force-reinstall --no-index --no-deps /wheelhouse/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.