Skip to content

Refactor/roma feedback #364

Refactor/roma feedback

Refactor/roma feedback #364

Workflow file for this run

name: check backend
on:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
jobs:
check_backend_codestyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: setup poetry and install dependencies
run: |
python -m pip install --upgrade pip poetry
python -m poetry lock --no-update
python -m poetry install --with lint --no-interaction
working-directory: backend
- name: run black codestyle
run: |
python -m poetry run black --line-length=120 --check .
working-directory: backend
- name: run flake8 codestyle
run: |
python -m poetry run flake8 --max-line-length 120 --ignore=E203 .
working-directory: backend
- name: run isort codestyle
run: |
python -m poetry run isort --line-length=120 --diff .
working-directory: backend
test_backend:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [macOS-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: setup poetry and install dependencies
run: |
python -m pip install --upgrade pip poetry
python -m poetry lock --no-update
python -m poetry install --with lint --no-interaction
working-directory: backend
- name: build wheel
run: |
python -m poetry build
working-directory: backend
- name: Create new project
run: |
python -m poetry run chatsky.ui init --destination ../ --no-input --overwrite-if-exists
working-directory: backend
- name: Install chatsky-ui into new project poetry environment
run: |
../bin/add_ui_to_toml.sh
working-directory: my_project
- name: run tests
run: |
python -m poetry install --no-root
python -m poetry run pytest ../backend/chatsky_ui/tests/ --verbose
working-directory: my_project