Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable26] fix: update testing range for 25, 26 and 27, and update dependencies #495

Merged
merged 16 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/check-same-code-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,32 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["8.1"]
php-versions: ["8.2"]

name: check-same-code-base

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: composer i

- name: check-same-code-base
run: make check-same-code-base

- name: check-updater-phar
run: |
make box
./box info -l updater.phar | grep -v "^Signature Hash" | grep -v "^ Version.php " | grep -v "^Contents: " >updater.old.txt
./vendor/bin/box info -l updater.phar | grep -v "^Signature Hash" | grep -v "^ Version.php " | grep -v "^Contents: " | grep -v "^ installed.php " > updater.old.txt
make updater.phar
./box info -l updater.phar | grep -v "^Signature Hash" | grep -v "^ Version.php " | grep -v "^Contents: " >updater.txt
./vendor/bin/box info -l updater.phar | grep -v "^Signature Hash" | grep -v "^ Version.php " | grep -v "^Contents: " | grep -v "^ installed.php " > updater.txt
diff updater.txt updater.old.txt
25 changes: 13 additions & 12 deletions .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint
name: Lint php-cs

on:
pull_request:
push:
branches:
- main
- master
- stable*
on: pull_request

permissions:
contents: read

concurrency:
group: lint-php-cs-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -24,13 +22,16 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
- name: Set up php
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: "7.4"
php-version: 8.1
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: composer i
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint
name: Lint php

on:
pull_request:
Expand All @@ -16,24 +16,31 @@ on:
permissions:
contents: read

concurrency:
group: lint-php-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
php-lint:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["7.4", "8.0", "8.1"]
php-versions: [ "8.0", "8.1", "8.2" ]

name: php-lint

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint
run: composer run lint
Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Static analysis

on:
pull_request:
push:
branches:
- master
- main
- stable*

concurrency:
group: psalm-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
static-psalm-analysis:
static-analysis:
runs-on: ubuntu-latest

strategy:
matrix:
ocp-version: [ 'dev-master' ]

name: Nextcloud ${{ matrix.ocp-version }}
name: Nextcloud
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: 7.4
php-version: 8.1
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: composer i
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ permissions:
contents: read

jobs:
php-lint:
test-cli:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["7.4"]
php-versions: ["8.1"]

name: test-cli

Expand All @@ -28,7 +28,12 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
ini-file: development

- name: Install dependencies
run: composer i

- name: test-cli
run: make test-cli
11 changes: 8 additions & 3 deletions .github/workflows/test-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["8.0", "8.1"]
php-versions: ["8.0", "8.1", "8.2"]

name: test-master

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
ini-file: development

- name: Install dependencies
run: composer i

- name: test-master
run: make test-master
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/test-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,31 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["7.4", "8.0"]
nextcloud-versions: ["19", "20", "21"]
php-versions: ["8.0", "8.1", "8.2"]
nextcloud-versions: ["24", "25", "26"]
exclude:
- php-versions: "8.0"
nextcloud-versions: "19"
- php-versions: "8.0"
nextcloud-versions: "20"
- php-versions: "8.2"
nextcloud-versions: "25"
- php-versions: "8.2"
nextcloud-versions: "24"


name: test-stable

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
ini-file: development

- name: Install dependencies
run: composer i

- name: test-stable${{ matrix.nextcloud-versions }}
run: make test-stable${{ matrix.nextcloud-versions }}
Expand Down
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
box
lib/Version.php
tests/data
tests/vendor
vendor/symfony/console/Tests
vendor/symfony/debug/Tests
/box
/lib/Version.php
/tests/data
/tests/vendor
/vendor/bamarni/composer-bin-plugin/e2e
/vendor/bin
/vendor/symfony/console/Tests
/vendor/symfony/debug/Tests
/vendor-bin/**/vendor
.php-cs-fixer.cache
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
.PHONY: updater.phar

box:
curl -L https://github.com/box-project/box/releases/download/3.11.1/box.phar -o box
chmod +x box

updater.phar: box updater.php lib/*.php buildVersionFile.php
updater.phar: updater.php lib/*.php buildVersionFile.php
php buildVersionFile.php
composer dump-autoload
./box compile -c box.json
composer run box
chmod +x updater.phar
rm lib/Version.php

Expand All @@ -29,14 +25,14 @@ test: updater.phar test/vendor
test-cli: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/cli.feature

test-stable19: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/stable19.feature
test-stable24: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/stable24.feature

test-stable20: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/stable20.feature
test-stable25: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/stable25.feature

test-stable21: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/stable21.feature
test-stable26: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/stable26.feature

test-master: updater.phar test/vendor
cd tests && vendor/behat/behat/bin/behat features/master.feature
Expand Down
21 changes: 14 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,31 @@
"classmap-authoritative": true,
"optimize-autoloader": true,
"platform": {
"php": "7.4"
"php": "8.0"
},
"sort-packages": true
},
"require": {
"symfony/console": "^4.4"
},
"scripts": {
"box": "box compile -c box.json",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"lint": "find . -name \\*.php -not -path './vendor*' -not -path './build/*' -not -path './node_modules/*' -print0 | xargs -0 -n1 php -l",
"post-install-cmd": ["@composer bin all install --ansi"],
"post-update-cmd": ["@composer bin all update --ansi"],
"psalm": "psalm",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"psalm:update-baseline": "psalm --threads=1 --update-baseline"
"psalm": "psalm --threads=$(nproc)",
"psalm:ci": "psalm --threads=1",
"psalm:fix": "- --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.5"
"bamarni/composer-bin-plugin": "^1.8",
"nextcloud/coding-standard": "^1.1"
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"target-directory": "vendor-bin",
"forward-command": true
}
}
}
Loading