Skip to content

Commit 4f2bbf6

Browse files
authored
removed Nextcloud 26/27 (#269)
Nextcloud 26 is not supported already. Support Nextcloud 27.1 is EOL in two months. _This is not mean that `nc-py-api` will stop working with them, there will be just no tests for them._ Signed-off-by: Alexander Piskun <[email protected]>
1 parent 94a37e9 commit 4f2bbf6

File tree

5 files changed

+62
-92
lines changed

5 files changed

+62
-92
lines changed

.github/workflows/analysis-coverage.yml

+46-66
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ env:
2020
APP_PORT: 9009
2121
NC_AUTH_USER: "admin"
2222
NC_AUTH_PASS: "adminpassword"
23+
NEXTCLOUD_VERSION: 28.0.7
24+
NEXTCLOUD_BRANCH: stable28
2325

2426
jobs:
2527
analysis:
@@ -30,7 +32,7 @@ jobs:
3032
- uses: actions/checkout@v4
3133
- uses: actions/setup-python@v5
3234
with:
33-
python-version: "3.10"
35+
python-version: '3.10'
3436

3537
- name: Install from source
3638
run: python3 -m pip install ".[dev]"
@@ -41,14 +43,7 @@ jobs:
4143
tests-maria:
4244
needs: [analysis]
4345
runs-on: ubuntu-22.04
44-
name: ${{ matrix.nextcloud }} • 🐘${{ matrix.php-version }} • 🐍${{ matrix.python }} • Maria
45-
strategy:
46-
fail-fast: false
47-
matrix:
48-
include:
49-
- nextcloud: "27.1.11"
50-
python: "3.10"
51-
php-version: "8.1"
46+
name: 28.X.X • 🐘8.1 • 🐍3.10 • Maria
5247
timeout-minutes: 60
5348

5449
services:
@@ -69,31 +64,27 @@ jobs:
6964
- name: Set up php
7065
uses: shivammathur/setup-php@v2
7166
with:
72-
php-version: ${{ matrix.php-version }}
67+
php-version: '8.1'
7368
extensions: mbstring, fileinfo, intl, pdo_mysql, zip, gd
7469

7570
- uses: actions/setup-python@v5
7671
with:
77-
python-version: ${{ matrix.python }}
78-
79-
- name: Stable27
80-
if: ${{ startsWith(matrix.nextcloud, '27.') }}
81-
run: echo "NC_BRANCH_NAME=stable27" >> $GITHUB_ENV
72+
python-version: '3.10'
8273

8374
- name: cache-nextcloud
8475
id: nextcloud_setup
8576
uses: actions/cache@v4
8677
with:
87-
path: nextcloud-${{ matrix.nextcloud }}.tar.bz2
88-
key: ${{ matrix.nextcloud }}
78+
path: nextcloud-${{ env.NEXTCLOUD_VERSION }}.tar.bz2
79+
key: ${{ env.NEXTCLOUD_VERSION }}
8980

9081
- name: Download Nextcloud
9182
if: steps.nextcloud_setup.outputs.cache-hit != 'true'
92-
run: wget -q https://download.nextcloud.com/server/releases/nextcloud-${{ matrix.nextcloud }}.tar.bz2
83+
run: wget -q https://download.nextcloud.com/server/releases/nextcloud-${{ env.NEXTCLOUD_VERSION }}.tar.bz2
9384

9485
- name: Set up Nextcloud
9586
run: |
96-
tar -xjf nextcloud-${{ matrix.nextcloud }}.tar.bz2 --strip-components 1
87+
tar -xjf nextcloud-${{ env.NEXTCLOUD_VERSION }}.tar.bz2 --strip-components 1
9788
mkdir data
9889
php occ maintenance:install --verbose --database=mysql --database-name=nextcloud \
9990
--database-host=127.0.0.1 --database-user=root --database-pass=rootpassword \
@@ -135,7 +126,7 @@ jobs:
135126
with:
136127
path: apps/spreed
137128
repository: nextcloud/spreed
138-
ref: ${{ env.NC_BRANCH_NAME }}
129+
ref: ${{ env.NEXTCLOUD_BRANCH }}
139130

140131
- name: Install Talk
141132
working-directory: apps/spreed
@@ -170,34 +161,27 @@ jobs:
170161
kill -15 $(cat /tmp/_install_models.pid)
171162
timeout 3m tail --pid=$(cat /tmp/_install_models.pid) -f /dev/null
172163
cd nc_py_api
173-
coverage combine && coverage xml -o coverage_maria_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}.xml
164+
coverage combine && coverage xml -o coverage_maria_${{ env.NEXTCLOUD_VERSION }}_3.10_8.1.xml
174165
175166
- name: Upload Codecov to artifacts
176167
uses: actions/upload-artifact@v4
177168
with:
178-
name: coverage_maria_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}.xml
179-
path: nc_py_api/coverage_maria_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}.xml
169+
name: coverage_maria_${{ env.NEXTCLOUD_VERSION }}_3.10_8.1.xml
170+
path: nc_py_api/coverage_maria_${{ env.NEXTCLOUD_VERSION }}_3.10_8.1.xml
180171
if-no-files-found: error
181172

182173
- name: Upload NC logs
183174
if: always()
184175
uses: actions/upload-artifact@v4
185176
with:
186-
name: nc_log_maria_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}
177+
name: nc_log_maria_${{ env.NEXTCLOUD_VERSION }}_3.10_8.1
187178
path: data/nextcloud.log
188179
if-no-files-found: warn
189180

190181
tests-pgsql:
191182
needs: [analysis]
192183
runs-on: ubuntu-22.04
193-
name: ${{ matrix.nextcloud }} • 🐘${{ matrix.php-version }} • 🐍${{ matrix.python }} • PgSQL
194-
strategy:
195-
fail-fast: false
196-
matrix:
197-
include:
198-
- nextcloud: "27.1.11"
199-
python: "3.11"
200-
php-version: "8.2"
184+
name: 28.X.X • 🐘8.2 • 🐍3.11 • PgSQL
201185
env:
202186
NC_dbname: nextcloud_abz
203187
DATABASE_PGSQL: 1
@@ -219,34 +203,30 @@ jobs:
219203
- 5432:5432
220204

221205
steps:
222-
- name: Set up php ${{ matrix.php-version }}
206+
- name: Set up php 8.2
223207
uses: shivammathur/setup-php@v2
224208
with:
225-
php-version: ${{ matrix.php-version }}
209+
php-version: '8.2'
226210
extensions: mbstring, fileinfo, intl, pdo_mysql, zip, gd
227211

228212
- uses: actions/setup-python@v5
229213
with:
230-
python-version: ${{ matrix.python }}
231-
232-
- name: Stable27
233-
if: ${{ startsWith(matrix.nextcloud, '27.') }}
234-
run: echo "NC_BRANCH_NAME=stable27" >> $GITHUB_ENV
214+
python-version: '3.11'
235215

236216
- name: cache-nextcloud
237217
id: nextcloud_setup
238218
uses: actions/cache@v4
239219
with:
240-
path: nextcloud-${{ matrix.nextcloud }}.tar.bz2
241-
key: ${{ matrix.nextcloud }}
220+
path: nextcloud-${{ env.NEXTCLOUD_VERSION }}.tar.bz2
221+
key: ${{ env.NEXTCLOUD_VERSION }}
242222

243223
- name: Download Nextcloud
244224
if: steps.nextcloud_setup.outputs.cache-hit != 'true'
245-
run: wget -q https://download.nextcloud.com/server/releases/nextcloud-${{ matrix.nextcloud }}.tar.bz2
225+
run: wget -q https://download.nextcloud.com/server/releases/nextcloud-${{ env.NEXTCLOUD_VERSION }}.tar.bz2
246226

247227
- name: Set up Nextcloud
248228
run: |
249-
tar -xjf nextcloud-${{ matrix.nextcloud }}.tar.bz2 --strip-components 1
229+
tar -xjf nextcloud-${{ env.NEXTCLOUD_VERSION }}.tar.bz2 --strip-components 1
250230
mkdir data
251231
php occ maintenance:install --verbose --database=pgsql --database-name=${{ env.NC_dbname }} \
252232
--database-host=127.0.0.1 --database-user=root --database-pass=rootpassword \
@@ -288,7 +268,7 @@ jobs:
288268
with:
289269
path: apps/spreed
290270
repository: nextcloud/spreed
291-
ref: ${{ env.NC_BRANCH_NAME }}
271+
ref: ${{ env.NEXTCLOUD_BRANCH }}
292272

293273
- name: Install Talk
294274
working-directory: apps/spreed
@@ -323,27 +303,27 @@ jobs:
323303
kill -15 $(cat /tmp/_install_models.pid)
324304
timeout 3m tail --pid=$(cat /tmp/_install_models.pid) -f /dev/null
325305
cd nc_py_api
326-
coverage combine && coverage xml -o coverage_pgsql_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}.xml
306+
coverage combine && coverage xml -o coverage_pgsql_${{ env.NEXTCLOUD_VERSION }}_3.11_8.2.xml
327307
328308
- name: Upload Codecov to artifacts
329309
uses: actions/upload-artifact@v4
330310
with:
331-
name: coverage_pgsql_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}.xml
332-
path: nc_py_api/coverage_pgsql_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}.xml
311+
name: coverage_pgsql_${{ env.NEXTCLOUD_VERSION }}_3.11_8.2.xml
312+
path: nc_py_api/coverage_pgsql_${{ env.NEXTCLOUD_VERSION }}_3.11_8.2.xml
333313
if-no-files-found: error
334314

335315
- name: Upload NC logs
336316
if: always()
337317
uses: actions/upload-artifact@v4
338318
with:
339-
name: nc_log_pgsql_${{ matrix.nextcloud }}_${{ matrix.python }}_${{ matrix.php-version }}
319+
name: nc_log_pgsql_${{ env.NEXTCLOUD_VERSION }}_3.11_8.2
340320
path: data/nextcloud.log
341321
if-no-files-found: warn
342322

343-
tests-stable27-oci:
323+
tests-oci:
344324
needs: [analysis]
345325
runs-on: ubuntu-22.04
346-
name: stable27 • 🐘8.1 • 🐍3.11 • OCI
326+
name: stable28 • 🐘8.1 • 🐍3.11 • OCI
347327
timeout-minutes: 60
348328

349329
services:
@@ -378,13 +358,13 @@ jobs:
378358
with:
379359
submodules: true
380360
repository: nextcloud/server
381-
ref: 'stable27'
361+
ref: ${{ env.NEXTCLOUD_BRANCH }}
382362

383363
- name: Checkout Notifications
384364
uses: actions/checkout@v4
385365
with:
386366
repository: nextcloud/notifications
387-
ref: 'stable27'
367+
ref: ${{ env.NEXTCLOUD_BRANCH }}
388368
path: apps/notifications
389369

390370
- name: Set up Nextcloud
@@ -430,22 +410,22 @@ jobs:
430410
run: |
431411
coverage run --data-file=.coverage.ci -m pytest
432412
coverage run --data-file=.coverage.at_the_end -m pytest tests/_tests_at_the_end.py
433-
coverage combine && coverage xml -o coverage_oci_stable27_3.11_8.1.xml
413+
coverage combine && coverage xml -o coverage_oci_${{ env.NEXTCLOUD_BRANCH }}_3.11_8.1.xml
434414
env:
435415
SKIP_NC_CLIENT_TESTS: 1
436416

437417
- name: Upload Codecov to artifacts
438418
uses: actions/upload-artifact@v4
439419
with:
440-
name: coverage_oci_stable27_3.11_8.1.xml
441-
path: nc_py_api/coverage_oci_stable27_3.11_8.1.xml
420+
name: coverage_oci_${{ env.NEXTCLOUD_BRANCH }}_3.11_8.1.xml
421+
path: nc_py_api/coverage_oci_${{ env.NEXTCLOUD_BRANCH }}_3.11_8.1.xml
442422
if-no-files-found: error
443423

444424
- name: Upload NC logs
445425
if: always()
446426
uses: actions/upload-artifact@v4
447427
with:
448-
name: nc_log_oci_stable27_3.11_8.1
428+
name: nc_log_oci_${{ env.NEXTCLOUD_BRANCH }}_3.11_8.1
449429
path: data/nextcloud.log
450430
if-no-files-found: warn
451431

@@ -456,7 +436,7 @@ jobs:
456436
strategy:
457437
fail-fast: false
458438
matrix:
459-
nextcloud: [ 'stable27', 'stable28', 'master' ]
439+
nextcloud: [ 'stable28', 'stable29', 'master' ]
460440
timeout-minutes: 60
461441

462442
services:
@@ -477,7 +457,7 @@ jobs:
477457
- name: Set up php
478458
uses: shivammathur/setup-php@v2
479459
with:
480-
php-version: 8.2
460+
php-version: '8.2'
481461
extensions: mbstring, fileinfo, intl, pdo_mysql, zip, gd, curl
482462

483463
- uses: actions/setup-python@v5
@@ -635,7 +615,7 @@ jobs:
635615
strategy:
636616
fail-fast: false
637617
matrix:
638-
nextcloud: [ 'stable27', 'stable28', 'master' ]
618+
nextcloud: [ 'stable28', 'stable29', 'master' ]
639619
env:
640620
NC_dbname: nextcloud_abz
641621
DATABASE_PGSQL: 1
@@ -660,7 +640,7 @@ jobs:
660640
- name: Set up php
661641
uses: shivammathur/setup-php@v2
662642
with:
663-
php-version: 8.2
643+
php-version: '8.2'
664644
extensions: mbstring, fileinfo, intl, pdo_mysql, zip, gd
665645

666646
- uses: actions/setup-python@v5
@@ -807,7 +787,7 @@ jobs:
807787
strategy:
808788
fail-fast: false
809789
matrix:
810-
nextcloud: [ 'stable26', 'stable27', 'stable28', 'master' ]
790+
nextcloud: [ 'stable27', 'stable28', 'stable29', 'master' ]
811791
env:
812792
NEXTCLOUD_URL: "http://localhost:8080/index.php"
813793
timeout-minutes: 60
@@ -816,12 +796,12 @@ jobs:
816796
- name: Set up php
817797
uses: shivammathur/setup-php@v2
818798
with:
819-
php-version: 8.1
799+
php-version: '8.1'
820800
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, curl
821801

822802
- uses: actions/setup-python@v5
823803
with:
824-
python-version: 3.12
804+
python-version: '3.12'
825805

826806
- name: Checkout server
827807
uses: actions/checkout@v4
@@ -847,7 +827,7 @@ jobs:
847827

848828
- name: Checkout Files Locking
849829
uses: actions/checkout@v4
850-
if: ${{ !startsWith(matrix.nextcloud, 'stable26') && !startsWith(matrix.nextcloud, 'master') }}
830+
if: ${{ !startsWith(matrix.nextcloud, 'stable27') && !startsWith(matrix.nextcloud, 'master') }}
851831
with:
852832
repository: nextcloud/files_lock
853833
ref: ${{ matrix.nextcloud }}
@@ -871,7 +851,7 @@ jobs:
871851
run: ./occ app:enable notes
872852

873853
- name: Enable Files Locking
874-
if: ${{ !startsWith(matrix.nextcloud, 'stable26') && !startsWith(matrix.nextcloud, 'master') }}
854+
if: ${{ !startsWith(matrix.nextcloud, 'stable27') && !startsWith(matrix.nextcloud, 'master') }}
875855
run: ./occ app:enable files_lock
876856

877857
- name: Checkout NcPyApi
@@ -928,7 +908,7 @@ jobs:
928908
if-no-files-found: warn
929909

930910
tests-upload-coverage:
931-
needs: [tests-maria, tests-pgsql, tests-stable27-oci, tests-latest-maria, test-latest-pgsql, tests-client-sqlite]
911+
needs: [tests-maria, tests-pgsql, tests-oci, tests-latest-maria, test-latest-pgsql, tests-client-sqlite]
932912
permissions:
933913
contents: none
934914
runs-on: ubuntu-22.04

Makefile

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,32 @@ help:
1919
@echo " Next commands are only for dev environment with nextcloud-docker-dev!"
2020
@echo " They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!"
2121
@echo " "
22-
@echo " register27 register nc_py_api for Nextcloud 27"
2322
@echo " register28 register nc_py_api for Nextcloud 28"
2423
@echo " register29 register nc_py_api for Nextcloud 29"
24+
@echo " register30 register nc_py_api for Nextcloud 30"
2525
@echo " register register nc_py_api for Nextcloud Last"
2626
@echo " "
27-
@echo " tests27 run nc_py_api tests for Nextcloud 27"
2827
@echo " tests28 run nc_py_api tests for Nextcloud 28"
2928
@echo " tests29 run nc_py_api tests for Nextcloud 29"
29+
@echo " tests30 run nc_py_api tests for Nextcloud 30"
3030
@echo " tests run nc_py_api tests for Nextcloud Last"
3131

32-
.PHONY: register27
33-
register27:
34-
/bin/sh scripts/dev_register.sh master-stable27-1 stable27.local
35-
3632
.PHONY: register28
3733
register28:
3834
/bin/sh scripts/dev_register.sh master-stable28-1 stable28.local
3935

4036
.PHONY: register29
4137
register29:
42-
/bin/sh scripts/dev_register.sh master-stable29-1 stable28.local
38+
/bin/sh scripts/dev_register.sh master-stable29-1 stable29.local
39+
40+
.PHONY: register30
41+
register30:
42+
/bin/sh scripts/dev_register.sh master-stable30-1 stable30.local
4343

4444
.PHONY: register
4545
register:
4646
/bin/sh scripts/dev_register.sh master-nextcloud-1 nextcloud.local
4747

48-
.PHONY: tests27
49-
tests27:
50-
NEXTCLOUD_URL=http://stable27.local python3 -m pytest
51-
5248
.PHONY: tests28
5349
tests28:
5450
NEXTCLOUD_URL=http://stable28.local python3 -m pytest
@@ -57,6 +53,10 @@ tests28:
5753
tests29:
5854
NEXTCLOUD_URL=http://stable29.local python3 -m pytest
5955

56+
.PHONY: tests30
57+
tests30:
58+
NEXTCLOUD_URL=http://stable30.local python3 -m pytest
59+
6060
.PHONY: tests
6161
tests:
6262
NEXTCLOUD_URL=http://nextcloud.local python3 -m pytest

0 commit comments

Comments
 (0)