-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (58 loc) · 1.7 KB
/
test.yaml
File metadata and controls
61 lines (58 loc) · 1.7 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
59
60
61
name: Run tests
on: [push, pull_request]
jobs:
check-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.14"
- uses: snok/install-poetry@v1
with:
poetry-version: "2.2.1"
- name: Configure git
run: |
git config --global user.email "me@example.com"
git config --global user.name "My Name"
- name: Regenerate examples
run: |
./example.sh
(cd flask && ./example.sh)
(cd fastapi && ./example.sh)
- name: Check for changes (excluding lockfiles)
run: git diff --exit-code -- . ':!**/poetry.lock' ':!**/commits.txt'
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.14"
- uses: snok/install-poetry@v1
with:
poetry-version: "2.2.1"
- name: Configure git
run: |
git config --global user.email "me@example.com"
git config --global user.name "My Name"
- run: ./test.sh
env:
DATABASE_URL: postgresql://postgres:postgrespass@localhost:5432/testdb
- run: ./test.sh
working-directory: flask
- run: ./fastapi/test.sh
env:
DATABASE_URL: postgresql+asyncpg://postgres:postgrespass@localhost:5432/postgres
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgrespass
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432