Skip to content

Commit 449e6a5

Browse files
committed
test: add pytest.yml
1 parent c306a88 commit 449e6a5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/pytest.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@ jobs:
1212
strategy:
1313
matrix:
1414
python-version: ["3.13"]
15-
1615
steps:
1716
- uses: actions/checkout@v3
1817
- name: Set up Python ${{ matrix.python-version }}
1918
uses: actions/setup-python@v4
2019
with:
2120
python-version: ${{ matrix.python-version }}
22-
2321
- name: Install dependencies
2422
run: |
2523
python -m pip install --upgrade pip
26-
pip install -r backend/src/requirements.txt
27-
pip install -r backend/src/requirements-dev.txt
24+
cd backend/src
25+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
2827
29-
- name: Create .env and Test with Pytest
28+
- name: Test with Pytest
3029
env:
3130
PYTHONPATH: ${{ github.workspace }}/backend/src
3231
run: |
@@ -54,4 +53,5 @@ jobs:
5453
POSTGRES_USER=testuser
5554
POSTGRES_PASSWORD=testpassword
5655
EOF
57-
pytest backend/tests
56+
cd ../..
57+
pytest --config-file=backend/pyproject.toml backend/tests

0 commit comments

Comments
 (0)