Skip to content

Refactor scheduler

Refactor scheduler #38

Workflow file for this run

name: Pipelines PR
on:
pull_request:
paths:
- "pipeline/**"
env:
DEBUG: true
jobs:
linter:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install Deps
run: |
pip install -U pip
pip install poetry
poetry install
working-directory: pipeline
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run Black checks
run: poetry run black --check .
working-directory: pipeline
- name: Run Flake8 checks
run: poetry run flake8 --count .
working-directory: pipeline
test:
name: Run Tests
runs-on: ubuntu-latest
services:
api-db:
image: postgres:alpine3.16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: pipe_test
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Execute alembic migrations
run: |
pip install -U pip
pip install poetry
poetry install
poetry run alembic upgrade head
working-directory: api
env:
POETRY_VIRTUALENVS_CREATE: false
TEST_DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/pipe_test"
- name: Install Deps
run: |
pip install -U pip
pip install poetry
poetry install
working-directory: pipeline
- name: Run pytest check
run: poetry run pytest -vv
working-directory: pipeline
env:
PYTHONPATH: ../
TEST_DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/pipe_test"