-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (38 loc) · 1.14 KB
/
test.yml
File metadata and controls
48 lines (38 loc) · 1.14 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
name: Test
on:
push:
branches:
- main
pull_request:
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
enable-cache: true
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies
run: uv sync
- name: Ruff Lint
run: uv run ruff check .
- name: Ruff Format Check
run: uv run ruff format --check .
- name: Run tests
env:
PROJECT_NAME: "FastAPI Template Test"
POSTGRES_SERVER: "localhost"
POSTGRES_USER: ${{ secrets.POSTGRES_USER || 'postgres' }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD || 'testpassword' }}
FIRST_SUPERUSER: ${{ secrets.FIRST_SUPERUSER || 'admin@example.com' }}
FIRST_SUPERUSER_PASSWORD: ${{ secrets.FIRST_SUPERUSER_PASSWORD || 'testpassword' }}
run: uv run pytest