-
Notifications
You must be signed in to change notification settings - Fork 2
140 lines (110 loc) · 3.47 KB
/
e2e_test.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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