Pamela Fox
commited on
Commit
·
c1c4ad2
1
Parent(s):
7a052e5
DC and CI tweaks
Browse files- .devcontainer/devcontainer.json +3 -1
- .github/workflows/check.yaml +1 -1
- pyproject.toml +1 -1
- src/quizsite/settings.py +2 -0
.devcontainer/devcontainer.json
CHANGED
@@ -35,7 +35,8 @@
|
|
35 |
"editor.formatOnSave": true,
|
36 |
"editor.codeActionsOnSave": {
|
37 |
"source.fixAll": true
|
38 |
-
}
|
|
|
39 |
},
|
40 |
"python.formatting.provider": "black",
|
41 |
"files.exclude": {
|
@@ -49,6 +50,7 @@
|
|
49 |
"extensions": [
|
50 |
"ms-python.python",
|
51 |
"ms-python.vscode-pylance",
|
|
|
52 |
"charliermarsh.ruff",
|
53 |
"ms-azuretools.vscode-bicep",
|
54 |
"mtxr.sqltools",
|
|
|
35 |
"editor.formatOnSave": true,
|
36 |
"editor.codeActionsOnSave": {
|
37 |
"source.fixAll": true
|
38 |
+
},
|
39 |
+
"editor.defaultFormatter": "ms-python.black-formatter"
|
40 |
},
|
41 |
"python.formatting.provider": "black",
|
42 |
"files.exclude": {
|
|
|
50 |
"extensions": [
|
51 |
"ms-python.python",
|
52 |
"ms-python.vscode-pylance",
|
53 |
+
"ms-python.black-formatter",
|
54 |
"charliermarsh.ruff",
|
55 |
"ms-azuretools.vscode-bicep",
|
56 |
"mtxr.sqltools",
|
.github/workflows/check.yaml
CHANGED
@@ -39,7 +39,7 @@ jobs:
|
|
39 |
DBPASS: postgres
|
40 |
SECRET_KEY: django-insecure-key-${{ github.run_id }}-${{ github.run_attempt }}
|
41 |
run: |
|
42 |
-
python3 -m pytest
|
43 |
- name: Pytest coverage comment
|
44 |
uses: MishaKav/pytest-coverage-comment@main
|
45 |
with:
|
|
|
39 |
DBPASS: postgres
|
40 |
SECRET_KEY: django-insecure-key-${{ github.run_id }}-${{ github.run_attempt }}
|
41 |
run: |
|
42 |
+
python3 -m pytest --cov-report=xml:coverage.xml --junitxml=pytest.xml
|
43 |
- name: Pytest coverage comment
|
44 |
uses: MishaKav/pytest-coverage-comment@main
|
45 |
with:
|
pyproject.toml
CHANGED
@@ -14,7 +14,7 @@ exclude = '''
|
|
14 |
'''
|
15 |
|
16 |
[tool.pytest.ini_options]
|
17 |
-
addopts = "-ra --cov=src
|
18 |
pythonpath = ["src"]
|
19 |
python_files = ["tests.py"]
|
20 |
env_override_existing_values = 1
|
|
|
14 |
'''
|
15 |
|
16 |
[tool.pytest.ini_options]
|
17 |
+
addopts = "-ra --cov=src"
|
18 |
pythonpath = ["src"]
|
19 |
python_files = ["tests.py"]
|
20 |
env_override_existing_values = 1
|
src/quizsite/settings.py
CHANGED
@@ -38,6 +38,8 @@ SECRET_KEY = env("SECRET_KEY")
|
|
38 |
|
39 |
# SECURITY WARNING: don't run with debug turned on in production!
|
40 |
DEBUG = env("DEBUG")
|
|
|
|
|
41 |
|
42 |
# Configure the domain name using the environment variable
|
43 |
# that Azure automatically creates for us.
|
|
|
38 |
|
39 |
# SECURITY WARNING: don't run with debug turned on in production!
|
40 |
DEBUG = env("DEBUG")
|
41 |
+
# This allows us to use the VS Code debugger to break on exceptions
|
42 |
+
DEBUG_PROPAGATE_EXCEPTIONS = env("DEBUG")
|
43 |
|
44 |
# Configure the domain name using the environment variable
|
45 |
# that Azure automatically creates for us.
|