-
Notifications
You must be signed in to change notification settings - Fork 7
179 lines (153 loc) · 4.98 KB
/
nightly.yml
File metadata and controls
179 lines (153 loc) · 4.98 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: Ifitwala Nightly
on:
schedule:
- cron: "30 2 * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ifitwala-nightly-${{ github.ref }}
cancel-in-progress: false
env:
PYTHON_VERSION: "3.14"
NODE_VERSION: "24.x"
jobs:
backend-full:
name: nightly-backend-full
runs-on: [self-hosted, linux, x64, ifitwala-gce]
timeout-minutes: 180
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Verify Node runtime
run: |
which node
node -v
which yarn
yarn --version
- name: Install Bench
run: pip install frappe-bench
- name: Start Redis for bench
run: |
for port in 11000 12000 13000; do
if redis-cli -p "$port" ping >/dev/null 2>&1; then
echo "Redis already running on :$port"
continue
fi
redis-server --port "$port" --daemonize yes
redis-cli -p "$port" ping
done
- name: Init nightly bench
run: |
bench init --frappe-branch version-16 frappe-bench
cd frappe-bench
bench get-app ifitwala_ed "$GITHUB_WORKSPACE"
- name: Create ci-staging site
run: |
cd frappe-bench
bench new-site ci_staging \
--db-name ci_staging \
--admin-password admin \
--mariadb-root-password root \
--install-app ifitwala_ed \
--force
- name: Run full backend suite
run: |
cd frappe-bench
bench --site ci_staging run-tests --app ifitwala_ed
api-regression:
name: nightly-api-regression
runs-on: [self-hosted, linux, x64, ifitwala-gce]
needs: [backend-full]
timeout-minutes: 120
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Verify Node runtime
run: |
which node
node -v
which yarn
yarn --version
- name: Install Bench
run: pip install frappe-bench
- name: Start Redis for bench
run: |
for port in 11000 12000 13000; do
if redis-cli -p "$port" ping >/dev/null 2>&1; then
echo "Redis already running on :$port"
continue
fi
redis-server --port "$port" --daemonize yes
redis-cli -p "$port" ping
done
- name: Init nightly bench
run: |
bench init --frappe-branch version-16 frappe-bench
cd frappe-bench
bench get-app ifitwala_ed "$GITHUB_WORKSPACE"
- name: Create ci-staging site
run: |
cd frappe-bench
bench new-site ci_staging \
--db-name ci_staging \
--admin-password admin \
--mariadb-root-password root \
--install-app ifitwala_ed \
--force
- name: Run targeted API regression suite
run: |
cd frappe-bench
set +e
failed=0
modules=(
"ifitwala_ed.api.test_guardian_home"
"ifitwala_ed.api.test_users"
"ifitwala_ed.api.test_attendance"
"ifitwala_ed.api.test_calendar"
"ifitwala_ed.api.test_activity_booking"
)
for module in "${modules[@]}"; do
bench --site ci_staging run-tests --app ifitwala_ed --module "$module"
if [ "$?" -ne 0 ]; then
failed=1
fi
done
exit "$failed"
spa-smoke:
name: nightly-spa-smoke
runs-on: [self-hosted, linux, x64, ifitwala-gce]
timeout-minutes: 45
defaults:
run:
working-directory: ifitwala_ed/ui-spa
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache-dependency-path: ifitwala_ed/ui-spa/yarn.lock
- name: Install SPA deps
run: yarn install --frozen-lockfile
- name: Run type-check and build
run: |
yarn type-check
yarn build
- name: Run optional unit smoke
run: |
if yarn run -s test:unit:run; then
echo "SPA unit smoke passed"
else
echo "SPA unit smoke unavailable or failing; keeping nightly non-blocking"
fi