test: Fix up (#105) #400
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.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 install --with dev --no-interaction | |
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: run tests | |
run: | | |
python -m poetry run pytest chatsky_ui/tests/ --verbose | |
working-directory: backend |