-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (64 loc) · 1.84 KB
/
integration.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
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Integration Tests
on:
pull_request:
branches:
- main
jobs:
Test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.1-bullseye
env:
POSTGRES_PASSWORD: masterbase
POSTGRES_USER: MEGASCATTERBOMB
POSTGRES_DB: demos
ports:
- 8050:5432
minio:
image: minio/minio:edge-cicd
ports:
- 9000:9000
env:
MINIO_ROOT_USER: MEGASCATTERBOMB
MINIO_ROOT_PASSWORD: masterbase
options: --health-cmd "curl http://localhost:9000/minio/health/live"
env:
FORCE_COLOR: 1
TERM: xterm-color
MYPY_FORCE_COLOR: 1
MYPY_FORCE_TERMINAL_WIDTH: 200
PYTEST_ADDOPTS: --color=yes
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Fetch mc client
run: wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
- name: Create the bucket
run: ./mc alias set blobs http://127.0.0.1:9000 MEGASCATTERBOMB masterbase
- name: more minio bs
run: ./mc mb -p blobs/demoblobs
- name: Remove mc client
run: rm -v ./mc
- name: Install PDM
run: |
python -m pip install --upgrade pip
python -m pip install pdm
- name: Install dependencies
run: pdm sync -G:all
- name: Run tests
run: |
pdm run alembic upgrade head
pdm run pytest -m integration
env:
POSTGRES_PASSWORD: masterbase
POSTGRES_USER: MEGASCATTERBOMB
POSTGRES_HOST: localhost
POSTGRES_PORT: 8050
MINIO_HOST: localhost
MINIO_PORT: 9000
MINIO_ACCESS_KEY: MEGASCATTERBOMB
MINIO_SECRET_KEY: masterbase
DEVELOPMENT: true