Skip to content

Commit

Permalink
Merge pull request #48 from deeppavlov/dev
Browse files Browse the repository at this point in the history
release: v0.1.0b0
  • Loading branch information
Ramimashkouk authored Jun 6, 2024
2 parents cd61c1b + 329b063 commit 3dfdbf8
Show file tree
Hide file tree
Showing 181 changed files with 17,634 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/backend_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
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/df_designer

- name: run black codestyle
run: |
python -m poetry run black --line-length=120 --check .
working-directory: backend/df_designer

- name: run flake8 codestyle
run: |
python -m poetry run flake8 --max-line-length 120 --ignore=E203 .
working-directory: backend/df_designer

- name: run isort codestyle
run: |
python -m poetry run isort --line-length=120 --diff .
working-directory: backend/df_designer

test_backend:
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/df_designer

- name: build wheel
run: |
python -m poetry build
working-directory: backend/df_designer

- name: Create new project
run: |
python -m poetry run dflowd init --destination ../../ --no-input --overwrite-if-exists
working-directory: backend/df_designer

- name: run tests
run: |
python -m poetry install
python -m poetry run pytest ../backend/df_designer/app/tests/ --verbose
working-directory: df_designer_project
45 changes: 45 additions & 0 deletions .github/workflows/build_and_upload_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build_and_upload_release

on:
release:
types:
- published

jobs:
build:
name: build and upload release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: set up python
uses: actions/setup-python@v5

- name: setup poetry
run: |
python -m pip install --upgrade pip poetry
- name: build wheels and test uploading to pypi
if: startsWith(github.ref, 'refs/tags/v') != true
run: |
python -m poetry --build publish --dry-run
working-directory: backend/df_designer

- name: build wheels and upload to pypi
if: startsWith(github.ref, 'refs/tags/v')
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
python -m poetry --build publish
working-directory: backend/df_designer

- name: upload binaries into release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backend/df_designer/dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
33 changes: 33 additions & 0 deletions .github/workflows/docker_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Docker Images

on:
push:
branches:
- dev
- master
pull_request:
branches:
- dev

jobs:
build_images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- 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-ansi --no-interaction
working-directory: backend/df_designer

- name: Create new project
run: python -m poetry run dflowd init --destination ../../ --no-input --overwrite-if-exists
working-directory: backend/df_designer

- name: Build Frontend
run: docker build -f Dockerfile --build-arg PROJECT_DIR=df_designer_project --target=frontend-builder .

- name: Build backend & run app
run: docker build -f Dockerfile --build-arg PROJECT_DIR=df_designer_project --target=runtime .
139 changes: 139 additions & 0 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# name: test app

# on:
# push:
# branches:
# - dev
# pull_request:
# branches:
# - dev

# jobs:

# build_frontend:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v4

# - name: Install bun
# run: npm install -g bun

# - name: Install frontend dependencies
# run: bun install
# working-directory: frontend

# - name: Build frontend
# run: bun run build
# working-directory: frontend

# - run: touch file1.txt

# - name: Archive frontend dist
# uses: actions/upload-artifact@v4
# with:
# name: frontend-dist
# path: frontend/dist


# build_backend:
# runs-on: ubuntu-latest
# needs: build_frontend
# steps:
# - uses: actions/checkout@v4

# - name: Create dist directory
# run: mkdir -p frontend/dist

# - name: Download frontend dist
# uses: actions/download-artifact@v4
# with:
# name: frontend-dist
# path: frontend/dist

# - name: copy static files
# run: |
# cp -r frontend/dist/. backend/df_designer/app/static/

# - 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/df_designer

# - name: build wheel
# run: python -m poetry build
# working-directory: backend/df_designer

# - name: Archive backend dist
# uses: actions/upload-artifact@v4
# with:
# name: backend-dist
# path: backend/df_designer/dist


# run_app:
# runs-on: ubuntu-latest
# needs: build_backend
# steps:
# - uses: actions/checkout@v4

# - name: set up python 3.10
# uses: actions/setup-python@v5
# with:
# python-version: '3.10'

# - name: setup dflowd 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/df_designer

# - name: Create new project
# run: |
# python -m poetry run dflowd init --destination ../../ --no-input --overwrite-if-exists
# working-directory: backend/df_designer

# - name: Create dist directory
# run: mkdir -p backend/df_designer/dist

# - name: Download backend dist
# uses: actions/download-artifact@v4
# with:
# name: backend-dist
# path: backend/df_designer/dist

# - name: setup project poetry and install dependencies
# run: |
# python -m pip install --upgrade pip poetry
# python -m poetry lock --no-update
# python -m poetry install --no-interaction
# working-directory: df_designer_project

# - name: Run back & front
# run: |
# python -m poetry run dflowd run_backend &
# sleep 10
# working-directory: df_designer_project

# - name: Install bun
# run: npm install -g bun

# - name: Install frontend dependencies
# run: bun install
# working-directory: frontend

# - name: Cypress run
# uses: cypress-io/github-action@v6
# with:
# install-command: bun add cypress
# command: bun run e2e:chrome
# working-directory: frontend
# browser: chrome
16 changes: 16 additions & 0 deletions .github/workflows/frontend_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# name: front check

# on: [push, pull_request]

# jobs:
# build_and_check_frontend:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

# - name: Install bun
# run: npm install -g bun

# - name: Install dependencies
# run: bun install
# working-directory: frontend
Loading

0 comments on commit 3dfdbf8

Please sign in to comment.