-
Notifications
You must be signed in to change notification settings - Fork 6
125 lines (118 loc) · 3.78 KB
/
Copy pathci.yml
File metadata and controls
125 lines (118 loc) · 3.78 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
name: CI
on:
push:
branches:
- develop
- hotfix
- version-15
paths-ignore:
- "**/*.md"
pull_request:
branches:
- develop
- hotfix
- version-15
paths-ignore:
- "**/*.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
python: ${{ steps.filter.outputs.python }}
javascript: ${{ steps.filter.outputs.javascript }}
config: ${{ steps.filter.outputs.config }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
python:
- "**/*.py"
javascript:
- "**/*.js"
config:
- "**/*.json"
test_v17:
name: v17
needs: changes
if: |
github.event_name == 'workflow_dispatch' ||
github.ref_name == 'hotfix' ||
github.event.pull_request.head.ref == 'hotfix' ||
github.ref == 'refs/heads/develop' ||
needs.changes.outputs.python == 'true' ||
needs.changes.outputs.javascript == 'true' ||
needs.changes.outputs.config == 'true'
uses: ./.github/workflows/reusable_test.yml
with:
frappe_branch: "develop"
erpnext_branch: "develop"
python_version: "3.14"
node_version: "24"
mariadb_version: "10.11"
setuptools_version: "latest"
run_python: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.config == 'true' }}
run_ui: ${{ needs.changes.outputs.javascript == 'true' || needs.changes.outputs.config == 'true' }}
test_v16:
name: v16
needs: changes
if: |
github.event_name == 'workflow_dispatch' ||
github.ref_name == 'hotfix' ||
github.event.pull_request.head.ref == 'hotfix' ||
github.ref == 'refs/heads/version-16' ||
needs.changes.outputs.python == 'true' ||
needs.changes.outputs.javascript == 'true' ||
needs.changes.outputs.config == 'true'
uses: ./.github/workflows/reusable_test.yml
with:
frappe_branch: "version-16"
erpnext_branch: "version-16"
python_version: "3.14"
node_version: "24"
mariadb_version: "10.11"
setuptools_version: "latest"
run_python: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.config == 'true' }}
run_ui: ${{ needs.changes.outputs.javascript == 'true' || needs.changes.outputs.config == 'true' }}
test_v15:
name: v15
needs: changes
if: |
github.ref_name == 'hotfix' ||
github.event.pull_request.head.ref == 'hotfix' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/version-15' ||
needs.changes.outputs.python == 'true' ||
needs.changes.outputs.javascript == 'true' ||
needs.changes.outputs.config == 'true'
uses: ./.github/workflows/reusable_test.yml
with:
frappe_branch: "version-15"
erpnext_branch: "version-15"
python_version: "3.10"
node_version: "18"
mariadb_version: "10.6"
setuptools_version: "<70"
run_python: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.config == 'true' }}
run_ui: ${{ needs.changes.outputs.javascript == 'true' || needs.changes.outputs.config == 'true' }}
tests_passed:
name: All Tests Passed
needs: [test_v15, test_v16, test_v17]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check test outcomes
run: |
if [ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]; then
echo "Tests failed!"
exit 1
else
echo "Tests passed or were intentionally skipped!"
exit 0
fi