Skip to content

sync vs async example v1 #114

sync vs async example v1

sync vs async example v1 #114

Workflow file for this run

name: DSG lint test workflow
on:
push:
branches:
- "*"
pull_request:
env:
DB_NAME: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: "127.0.0.1"
DB_PORT: "5432"
jobs:
Lint-Check-Test-back:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- db: postgres
db_port: 5432
services:
postgres:
image: postgres:15.3
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
# defaults:
# run:
# working-directory: ./
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# - name: Install extra dependencies
# run: |
# sudo apt install -y graphviz graphviz-dev
- name: Install pip dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
pip install psycopg2 poetry proto-parser
- name: Install poetry
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install
- name: Run validation
run: |
poetry run black --diff --check .
poetry run flake8 .
poetry run isort --check-only --diff .
poetry run tests