forked from fastapi/full-stack-fastapi-template
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.62 KB
/
pytest.yml
File metadata and controls
58 lines (52 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Pytest
permissions:
contents: read
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/src/requirements.txt
pip install -r backend/src/requirements-dev.txt
- name: Test with Pytest
run: |
cat <<EOF > backend/src/.env
DOMAIN=localhost
FRONTEND_HOST=http://localhost:5173
ENVIRONMENT=local
PROJECT_NAME="Full Stack FastAPI Test Project"
STACK_NAME=full-stack-fastapi-test-project
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173"
SECRET_KEY=test_secret_key_for_ci_do_not_use_in_prod
FIRST_SUPERUSER=admin@example.com
FIRST_SUPERUSER_PASSWORD=test_password
SMTP_HOST=
SMTP_USER=
SMTP_PASSWORD=
EMAILS_FROM_EMAIL=
SMTP_TLS=True
SMTP_SSL=False
SMTP_PORT=587
POSTGRES_SERVER=db
POSTGRES_PORT=5432
POSTGRES_SOCKET=
POSTGRES_DB=testdb
POSTGRES_USER=testuser
POSTGRES_PASSWORD=testpassword
EOF
pytest --config-file=backend/pyproject.toml backend/tests