Skip to content

fix: Fixed ondelete for logos and documents #18

fix: Fixed ondelete for logos and documents

fix: Fixed ondelete for logos and documents #18

name: "Lint and Test"
on: [push]
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ALGORITHM: ${{ secrets.ALGORITHM }}
TOKEN_EXPIRE_TIME: ${{ secrets.TOKEN_EXPIRE_TIME }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
lint-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
ports:
- 3254:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry==1.7.1
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10.6'
cache: 'poetry'
- name: Install dependencies
run: poetry install --no-interaction --no-ansi
- name: Run migrations
run: poetry run alembic upgrade head
- name: Lint
run: make lint-ci
- name: Test
run: make test