Skip to content

Commit 4703094

Browse files
authored
Version 15.0.2
2 parents c936d9a + 1877176 commit 4703094

10 files changed

Lines changed: 188 additions & 33 deletions

File tree

.github/workflows/ci.yml

Lines changed: 110 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,125 @@ on:
55
push:
66
branches:
77
- develop
8+
- version-16
89
- version-15
910
pull_request:
1011
branches:
1112
- develop
13+
- version-16
1214
- version-15
1315

1416
concurrency:
15-
group: develop-erpnext_sumup-${{ github.event.number }}
17+
group: ${{ github.workflow }}-${{ github.ref }}
1618
cancel-in-progress: true
1719

1820
jobs:
19-
tests:
21+
tests_v16:
22+
if: ${{ (github.event_name == 'pull_request' && (github.base_ref == 'develop' || github.base_ref == 'version-16')) || (github.event_name != 'pull_request' && (github.ref_name == 'develop' || github.ref_name == 'version-16')) }}
2023
runs-on: ubuntu-latest
21-
strategy:
22-
fail-fast: false
23-
name: Server
24+
name: Server (v16)
25+
26+
services:
27+
redis-cache:
28+
image: redis:alpine
29+
ports:
30+
- 13000:6379
31+
redis-queue:
32+
image: redis:alpine
33+
ports:
34+
- 11000:6379
35+
mariadb:
36+
image: mariadb:10.6
37+
env:
38+
MYSQL_ROOT_PASSWORD: root
39+
ports:
40+
- 3306:3306
41+
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
42+
43+
steps:
44+
- name: Clone
45+
uses: actions/checkout@v3
46+
47+
- name: Find tests
48+
run: |
49+
echo "Finding tests"
50+
grep -rn "def test" > /dev/null
51+
52+
- name: Setup Python
53+
uses: actions/setup-python@v4
54+
with:
55+
python-version: '3.14'
56+
57+
- name: Setup Node
58+
uses: actions/setup-node@v3
59+
with:
60+
node-version: 24
61+
check-latest: true
62+
63+
- name: Cache pip
64+
uses: actions/cache@v4
65+
with:
66+
path: ~/.cache/pip
67+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py', '**/setup.cfg') }}
68+
restore-keys: |
69+
${{ runner.os }}-pip-
70+
${{ runner.os }}-
71+
72+
- name: Get yarn cache directory path
73+
id: yarn-cache-dir-path
74+
run: 'echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT'
75+
76+
- uses: actions/cache@v4
77+
id: yarn-cache
78+
with:
79+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
80+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
81+
restore-keys: |
82+
${{ runner.os }}-yarn-
83+
84+
- name: Update Package Repository
85+
run: sudo apt update
86+
87+
- name: Install MariaDB Client
88+
run: sudo apt-get install mariadb-client
89+
90+
- name: Setup
91+
run: |
92+
pip install frappe-bench
93+
bench init --frappe-branch version-16 --skip-redis-config-generation --skip-assets --python "$(which python)" ~/frappe-bench
94+
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL character_set_server = 'utf8mb4'"
95+
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
96+
97+
- name: Install
98+
working-directory: /home/runner/frappe-bench
99+
run: |
100+
bench get-app --branch version-16 erpnext
101+
bench get-app erpnext_sumup $GITHUB_WORKSPACE
102+
bench setup requirements --dev
103+
bench new-site --db-root-password root --admin-password admin test_site
104+
bench --site test_site install-app erpnext
105+
bench --site test_site install-app erpnext_sumup
106+
bench build
107+
env:
108+
CI: 'Yes'
109+
110+
- name: Migrate
111+
working-directory: /home/runner/frappe-bench
112+
run: |
113+
bench --site test_site migrate
114+
115+
- name: Run Tests
116+
working-directory: /home/runner/frappe-bench
117+
run: |
118+
bench --site test_site set-config allow_tests true
119+
bench --site test_site run-tests --app erpnext_sumup --skip-test-records
120+
env:
121+
TYPE: server
122+
123+
tests_v15:
124+
if: ${{ (github.event_name == 'pull_request' && github.base_ref == 'version-15') || (github.event_name != 'pull_request' && github.ref_name == 'version-15') }}
125+
runs-on: ubuntu-latest
126+
name: Server (v15)
24127

25128
services:
26129
redis-cache:
@@ -105,8 +208,8 @@ jobs:
105208
bench build
106209
env:
107210
CI: 'Yes'
108-
109-
- name: Migrate
211+
212+
- name: Migrate
110213
working-directory: /home/runner/frappe-bench
111214
run: |
112215
bench --site test_site migrate

.github/workflows/linter.yml

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Linters
33

44
on:
55
pull_request:
6+
branches:
7+
- develop
8+
- version-16
9+
- version-15
610
workflow_dispatch:
711

812
permissions:
@@ -13,16 +17,16 @@ concurrency:
1317
cancel-in-progress: true
1418

1519
jobs:
16-
linter:
17-
name: 'Frappe Linter'
20+
linter_v16:
21+
if: ${{ (github.event_name == 'pull_request' && (github.base_ref == 'develop' || github.base_ref == 'version-16')) || (github.event_name != 'pull_request' && (github.ref_name == 'develop' || github.ref_name == 'version-16')) }}
22+
name: 'Frappe Linter (v16)'
1823
runs-on: ubuntu-latest
19-
if: github.event_name == 'pull_request'
2024

2125
steps:
2226
- uses: actions/checkout@v4
2327
- uses: actions/setup-python@v5
2428
with:
25-
python-version: '3.10'
29+
python-version: '3.14'
2630
cache: pip
2731
- uses: pre-commit/action@v3.0.0
2832

@@ -34,14 +38,36 @@ jobs:
3438
pip install semgrep
3539
semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness
3640
37-
deps-vulnerable-check:
38-
name: 'Vulnerable Dependency Check'
41+
linter_v15:
42+
if: ${{ (github.event_name == 'pull_request' && github.base_ref == 'version-15') || (github.event_name != 'pull_request' && github.ref_name == 'version-15') }}
43+
name: 'Frappe Linter (v15)'
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-python@v5
49+
with:
50+
python-version: '3.12'
51+
cache: pip
52+
- uses: pre-commit/action@v3.0.0
53+
54+
- name: Download Semgrep rules
55+
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
56+
57+
- name: Run Semgrep rules
58+
run: |
59+
pip install semgrep
60+
semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness
61+
62+
deps_v16:
63+
if: ${{ (github.event_name == 'pull_request' && (github.base_ref == 'develop' || github.base_ref == 'version-16')) || (github.event_name != 'pull_request' && (github.ref_name == 'develop' || github.ref_name == 'version-16')) }}
64+
name: 'Vulnerable Dependency Check (v16)'
3965
runs-on: ubuntu-latest
4066

4167
steps:
4268
- uses: actions/setup-python@v5
4369
with:
44-
python-version: '3.10'
70+
python-version: '3.14'
4571

4672
- uses: actions/checkout@v4
4773

@@ -59,3 +85,30 @@ jobs:
5985
pip install pip-audit
6086
cd ${GITHUB_WORKSPACE}
6187
pip-audit --desc on .
88+
89+
deps_v15:
90+
if: ${{ (github.event_name == 'pull_request' && github.base_ref == 'version-15') || (github.event_name != 'pull_request' && github.ref_name == 'version-15') }}
91+
name: 'Vulnerable Dependency Check (v15)'
92+
runs-on: ubuntu-latest
93+
94+
steps:
95+
- uses: actions/setup-python@v5
96+
with:
97+
python-version: '3.12'
98+
99+
- uses: actions/checkout@v4
100+
101+
- name: Cache pip
102+
uses: actions/cache@v3
103+
with:
104+
path: ~/.cache/pip
105+
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py') }}
106+
restore-keys: |
107+
${{ runner.os }}-pip-
108+
${{ runner.os }}-pip-
109+
110+
- name: Install and run pip-audit
111+
run: |
112+
pip install pip-audit
113+
cd ${GITHUB_WORKSPACE}
114+
pip-audit --desc on .

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In the event of a refund or return, the amount will also be automatically refund
1818

1919
| ERPNext | Frappe | Support Status |
2020
|---------|--------|----------------|
21-
| v16 Beta | v16 Beta | Testing... |
21+
| v16 Beta | v16 Beta | ✅ Supported |
2222
| v15 | v15 | ✅ Supported |
2323

2424
## Installation (Frappe Cloud)
@@ -37,7 +37,7 @@ The app can be installed directly via Frappe Cloud:
3737
Once ERPNext is installed, add the app to your bench environment:
3838

3939
```bash
40-
bench get-app https://github.com/Rocket-Quack/erpnext_sumup.git --branch version-15
40+
bench get-app https://github.com/Rocket-Quack/erpnext_sumup.git --branch version-16
4141
```
4242

4343
Install requirements:
@@ -143,7 +143,7 @@ The name SumUp is used only to describe technical compatibility with the respect
143143

144144
## Third-Party
145145

146-
This app uses the Python package `sumup` v0.0.20 (tag v0.0.20). See `THIRD_PARTY_NOTICE.md`.
146+
This app uses the Python package `sumup` v0.0.22 (tag v0.0.22). See `THIRD_PARTY_NOTICE.md`.
147147

148148
## License
149149

THIRD_PARTY_NOTICE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
This project uses the following third-party software:
44

5-
- sumup (Python package), version 0.0.20 (tag v0.0.20)
5+
- sumup (Python package), version 0.0.22 (tag v0.0.22)
66
License: Apache License 2.0
77
Source: https://github.com/sumup/sumup-py

erpnext_sumup/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "15.0.1"
1+
__version__ = "15.0.2"

erpnext_sumup/erpnext_sumup/doctype/sumup_settings/sumup_settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
],
113113
"row_format": "Dynamic",
114114
"rows_threshold_for_grid_search": 20,
115-
"sort_field": "modified",
115+
"sort_field": "creation",
116116
"sort_order": "DESC",
117117
"states": []
118118
}

erpnext_sumup/erpnext_sumup/doctype/sumup_terminal/sumup_terminal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
],
105105
"row_format": "Dynamic",
106106
"rows_threshold_for_grid_search": 20,
107-
"sort_field": "modified",
107+
"sort_field": "creation",
108108
"sort_order": "DESC",
109109
"states": [],
110110
"title_field": "terminal_name",

erpnext_sumup/hooks.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@
2727

2828

2929
# Each item in the list will be shown as an app in the apps page
30-
# add_to_apps_screen = [
31-
# {
32-
# "name": "erpnext_sumup",
33-
# "logo": "/assets/erpnext_sumup/logo.png",
34-
# "title": "ERPNext SumUp",
35-
# "route": "/erpnext_sumup",
36-
# "has_permission": "erpnext_sumup.api.permission.has_app_permission"
37-
# }
38-
# ]
30+
add_to_apps_screen = [
31+
{
32+
"name": "erpnext_sumup",
33+
"logo": "/assets/erpnext_sumup/logo.png",
34+
"title": "ERPNext SumUp",
35+
"route": "/app/sumup-integration",
36+
}
37+
]
3938

4039
# Includes in <head>
4140
# ------------------

erpnext_sumup/public/logo.png

947 KB
Loading

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ authors = [
44
{ name = "RocketQuackIT", email = "contact@rocketquack.eu"}
55
]
66
description = "SumUp Integration für ERPNext"
7-
requires-python = ">=3.10"
7+
requires-python = ">=3.14"
88
readme = "README.md"
99
dynamic = ["version"]
1010
dependencies = [
11-
"sumup==0.0.20",
11+
"sumup==0.0.22",
1212
]
1313

1414
[build-system]
@@ -20,7 +20,7 @@ build-backend = "flit_core.buildapi"
2020
# package_name = "~=1.1.0"
2121

2222
[tool.bench.frappe-dependencies]
23-
frappe = ">=15.0.0-dev <16.0.0-dev"
23+
frappe = ">=15.0.0-dev,<16.0.0-dev"
2424

2525
[tool.ruff]
2626
line-length = 110

0 commit comments

Comments
 (0)