Skip to content
Closed

Tke #255

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
Binary file removed .DS_Store
Binary file not shown.
54 changes: 0 additions & 54 deletions .github/instructions/bicep-code-best-practices.instructions.md

This file was deleted.

254 changes: 0 additions & 254 deletions .github/instructions/terraform-azure.instructions.md

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: ["**"]
pull_request:

jobs:
test:
name: Server tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r app/server/requirements.txt pytest
- name: Run server tests
run: python -m pytest app/server/test_app.py -v

lint:
name: Lint server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Lint for unsafe SQL construction
run: |
python - <<'PY'
from pathlib import Path

target = Path("app/server/app.py")
source = target.read_text(encoding="utf-8")
needle = "SELECT id, name FROM dogs WHERE name LIKE '%"

if needle in source and '" + name + "' in source:
print(f"{target}: search_dogs builds SQL with string concatenation")
raise SystemExit(1)

print("No unsafe SQL string concatenation found.")
PY
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@
"prebuild"
],
"github.copilot.nextEditSuggestions.enabled": true,
"search.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
}
}
Loading