Skip to content

Init tests

Init tests #6

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install ruff
- run: ruff check .
test:
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: pricestation
POSTGRES_PASSWORD: pricestation
POSTGRES_DB: pricestation_test
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -r requirements-dev.txt
- run: pytest
env:
BOT_TOKEN: fake_token_for_tests
DATABASE_URL: postgresql+asyncpg://pricestation:pricestation@localhost:5432/pricestation_test