mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-18 20:09:25 +00:00
chore: update API tests workflow and database connection logic for testing environment
This commit is contained in:
parent
7b3229ff79
commit
7b220e8883
3 changed files with 53 additions and 20 deletions
28
.github/workflows/api-tests.yaml
vendored
28
.github/workflows/api-tests.yaml
vendored
|
|
@ -13,14 +13,19 @@ on:
|
|||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@v1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
version: "latest"
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v2
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
|
@ -30,4 +35,13 @@ jobs:
|
|||
- name: Run tests
|
||||
run: |
|
||||
cd apps/api
|
||||
uv run pytest -v
|
||||
uv run pytest src/tests/ -v --tb=short
|
||||
env:
|
||||
TESTING: "true"
|
||||
|
||||
- name: Run security tests with coverage
|
||||
run: |
|
||||
cd apps/api
|
||||
uv run pytest src/tests/security/ --cov=src.security --cov-report=xml --cov-report=term-missing
|
||||
env:
|
||||
TESTING: "true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue