-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.3 KB
/
sdk-python-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: sdk-python-ci
run-name: ${{ github.actor }} is executing ${{ github.workflow }} on ${{ github.event_name }} at ${{ github.sha }}
on:
pull_request:
branches:
- main
paths:
- sdk-python/**
defaults:
run:
working-directory: sdk-python
jobs:
sdk-python-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
- name: Setup Python 3.11.3
uses: actions/setup-python@v4
with:
python-version: "3.11.3"
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.5.1"
- name: Install dependencies
run: poetry install
- name: Generate prisma types
run: poetry run prisma generate --schema ../prisma/schema.prisma --generator client_py
- name: Check import organisation
run: poetry run isort omnilogger test --check-only # check test and omnilogger folder
- name: Check flake8 linting
run: poetry run flake8
- name: Check pylint linting
run: poetry run pylint */**.py --errors-only
- name: Check tests
run: poetry run pytest
- name: Check OpenAI API format
run: poetry run python test/openai_api/validate_format.py
- name: Check typing
run: poetry run pyright