chore: Enhance CI workflow with database schema initialization and testing dependencies
Some checks failed
CI / skip-ci-check (push) Successful in 1m27s
CI / lint-and-type-check (push) Has been cancelled
CI / python-lint (push) Has been cancelled
CI / test-backend (push) Has been cancelled
CI / build (push) Has been cancelled
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / workflow-summary (push) Has been cancelled
CI / skip-ci-check (pull_request) Successful in 1m26s
CI / lint-and-type-check (pull_request) Successful in 2m6s
CI / python-lint (pull_request) Successful in 1m52s
CI / test-backend (pull_request) Successful in 2m42s
CI / build (pull_request) Successful in 2m25s
CI / secret-scanning (pull_request) Successful in 1m40s
CI / dependency-scan (pull_request) Successful in 1m33s
CI / sast-scan (pull_request) Successful in 2m44s
CI / workflow-summary (pull_request) Successful in 1m26s
Some checks failed
CI / skip-ci-check (push) Successful in 1m27s
CI / lint-and-type-check (push) Has been cancelled
CI / python-lint (push) Has been cancelled
CI / test-backend (push) Has been cancelled
CI / build (push) Has been cancelled
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / workflow-summary (push) Has been cancelled
CI / skip-ci-check (pull_request) Successful in 1m26s
CI / lint-and-type-check (pull_request) Successful in 2m6s
CI / python-lint (pull_request) Successful in 1m52s
CI / test-backend (pull_request) Successful in 2m42s
CI / build (pull_request) Successful in 2m25s
CI / secret-scanning (pull_request) Successful in 1m40s
CI / dependency-scan (pull_request) Successful in 1m33s
CI / sast-scan (pull_request) Successful in 2m44s
CI / workflow-summary (pull_request) Successful in 1m26s
This commit updates the CI workflow to include a step for initializing database schemas, ensuring that the necessary database structure is in place before running tests. Additionally, it installs `pytest` and `httpx` as testing dependencies, improving the testing environment. These changes contribute to a more robust CI process and enhance the overall development workflow.
This commit is contained in:
parent
2020e84f94
commit
d0eed824c0
@ -184,6 +184,7 @@ jobs:
|
||||
run: |
|
||||
apt-get update && apt-get install -y postgresql-client
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
pip install --no-cache-dir pytest httpx
|
||||
|
||||
- name: Audit Python dependencies
|
||||
run: |
|
||||
@ -191,6 +192,12 @@ jobs:
|
||||
pip-audit --desc || true
|
||||
continue-on-error: true
|
||||
|
||||
- name: Initialize database schemas
|
||||
run: |
|
||||
export PYTHONPATH=$(pwd)
|
||||
python -c "from backend.db.models import Base; from backend.db.session import engine; Base.metadata.create_all(bind=engine)"
|
||||
echo "✅ Database schema initialized"
|
||||
|
||||
- name: Run backend tests
|
||||
run: |
|
||||
export PYTHONPATH=$(pwd)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user