-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (51 loc) · 1.38 KB
/
test-backend.yml
File metadata and controls
58 lines (51 loc) · 1.38 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: Backend Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test-backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: devbin_test
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.18"
enable-cache: true
cache-dependency-glob: "backend/uv.lock"
- name: Install dependencies
run: uv sync --group test --extra migrations --extra metrics
- name: Run tests
env:
APP_DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5433/devbin_test
APP_BASE_FOLDER_PATH: ./files/devbin_test_files
APP_DEBUG: "true"
APP_CORS_DOMAINS: '["http://test"]'
APP_ALLOW_CORS_WILDCARD: "false"
run: uv run pytest