-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1576 from govuk-one-login/BAU/better-dev-envars
BAU: Add a script to automatically build .env file for a given target environment
- Loading branch information
Showing
12 changed files
with
573 additions
and
184 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,50 @@ | ||
name: Pre-merge checks for Python | ||
on: | ||
pull_request: | ||
paths: ["**/*.py"] | ||
types: | ||
- opened | ||
- reopened | ||
- ready_for_review | ||
- synchronize | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.dev.txt | ||
pip install -r scripts/requirements.txt | ||
- name: Pylint | ||
run: | | ||
pylint -f actions $(git ls-files '*.py') | ||
- name: Flake8 | ||
run: | | ||
flake8p --format github $(git ls-files '*.py') | ||
- name: Black | ||
run: | | ||
black --check $(git ls-files '*.py') | ||
- name: isort | ||
run: | | ||
isort --check-only $(git ls-files '*.py') |
This file contains 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 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 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,20 @@ | ||
[tool.pylint] | ||
max-line-length = "88" | ||
disable = '''missing-module-docstring, | ||
missing-class-docstring, | ||
missing-function-docstring, | ||
invalid-name, | ||
too-few-public-methods, | ||
line-too-long | ||
''' | ||
ignore = ".venv" | ||
|
||
[tool.pylint.main] | ||
load-plugins = "pylint_actions" | ||
|
||
[tool.flake8] | ||
max-line-length = "88" | ||
extend-ignore = ["E203", "E701", "E501"] | ||
|
||
[tool.isort] | ||
profile = "black" |
This file contains 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,7 @@ | ||
pylint | ||
pylint-actions | ||
black | ||
isort | ||
flake8 | ||
Flake8-pyproject | ||
flake8-github-actions |
This file contains 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 @@ | ||
.venv |
Oops, something went wrong.