-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.11 KB
/
run_pytest.yml
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
name: Test using Pytest
on:
pull_request:
jobs:
run_tests:
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
FLASK_APP_COOKIE_ENCRYPTION_KEY: ${{ secrets.SECRET_KEY }}
DO_DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres
GH_CLIENT_ID: ${{secrets.GH_CLIENT_ID}}
GH_CLIENT_SECRET: ${{secrets.GH_CLIENT_SECRET}}
JWT_SECRET_KEY: "TestSecretKey"
RESET_PASSWORD_SECRET_KEY: "resetTokenSecretKey"
VALIDATE_EMAIL_SECRET_KEY: "validateEmailSecretKey"
name: Run Pytest
runs-on: ubuntu-latest
timeout-minutes: 20
container: python:3.12.8
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
alembic upgrade head
- name: Run tests
run: |
pytest tests