Skip to content

Fixes/front

Fixes/front #47

Workflow file for this run

name: test app
on:
push:
branches:
- dev
- master
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