External blob storage service #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:RELEASE.2024-06-06T09-36-42Z | |
ports: | |
- 9000:9000 | |
- 9001:9001 | |
env: | |
MINIO_ROOT_USER: MEGASCATTERBOMB | |
MINIO_ROOT_PASSWORD: masterbase | |
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: wait for minio | |
run: sleep 10 | |
- name: Fetch mc client | |
run: curl -o ./mc -# https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x ./mc | |
- name: Create the bucket | |
run: ./mc alias set blobs http://localhost:9000 MEGASCATTERBOMB masterbase && ./mc mb -p blobs/demos | |
- 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 | |
DEVELOPMENT: true |