-
Notifications
You must be signed in to change notification settings - Fork 1k
31 lines (28 loc) · 1016 Bytes
/
pytest.yaml
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
name: Pytest
on: [workflow_call]
permissions: read-all
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
fastapi-version: ['0.115']
env:
BACKEND_DIR: ./backend
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm-node-install
name: Install Node, pnpm and dependencies.
- uses: ./.github/actions/poetry-python-install
name: Install Python, poetry and Python dependencies
with:
python-version: ${{ matrix.python-version }}
poetry-install-args: --with tests --with mypy --with custom-data
poetry-working-directory: ${{ env.BACKEND_DIR }}
- name: Install fastapi ${{ matrix.fastapi-version }}
run: poetry add fastapi@^${{ matrix.fastapi-version}}
working-directory: ${{ env.BACKEND_DIR }}
- name: Run Pytest
run: poetry run pytest --cov=chainlit/
working-directory: ${{ env.BACKEND_DIR }}