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

fix: update testing range for 25, 26 and 27, and update dependencies #475

Merged
merged 11 commits into from Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/check-same-code-base.yml
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
9 changes: 7 additions & 2 deletions .github/workflows/test-cli.yml
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
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
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"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we not test 24 and 25 with php 7.4?

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
@@ -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
@@ -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
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
}
}
}