Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/csfixer"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/mozart"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/phpunit"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/psalm"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
ignore:
- dependency-name: css-loader
versions:
- ">= 4.a"
- "< 5"
15 changes: 13 additions & 2 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# 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: PHPUnit

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

permissions:
contents: read

env:
# Location of the phpunit.xml and phpunit.integration.xml files
PHPUNIT_CONFIG: ./tests/phpunit.xml
Expand Down Expand Up @@ -83,7 +92,7 @@ jobs:
# Only run if phpunit config file exists
if: steps.check_phpunit.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}
run: ./vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check PHPUnit integration config file existence
id: check_integration
Expand All @@ -100,9 +109,11 @@ jobs:
# Only run if phpunit integration config file exists
if: steps.check_integration.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
run: ./vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: phpunit-mysql

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# 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: PHPUnit

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

permissions:
contents: read

env:
# Location of the phpunit.xml and phpunit.integration.xml files
PHPUNIT_CONFIG: ./tests/phpunit.xml
Expand Down Expand Up @@ -80,7 +89,7 @@ jobs:
# Only run if phpunit config file exists
if: steps.check_phpunit.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}
run: ./vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check PHPUnit integration config file existence
id: check_integration
Expand All @@ -97,9 +106,11 @@ jobs:
# Only run if phpunit integration config file exists
if: steps.check_integration.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
run: ./vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: phpunit-pgsql

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# 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: PHPUnit

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

permissions:
contents: read

env:
# Location of the phpunit.xml and phpunit.integration.xml files
PHPUNIT_CONFIG: ./tests/phpunit.xml
Expand Down Expand Up @@ -69,7 +78,7 @@ jobs:
# Only run if phpunit config file exists
if: steps.check_phpunit.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}
run: ./vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check PHPUnit integration config file existence
id: check_integration
Expand All @@ -86,9 +95,11 @@ jobs:
# Only run if phpunit integration config file exists
if: steps.check_integration.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
run: ./vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: phpunit-sqlite

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ build
/node_modules
/js/dist
/vendor
/vendor-bin/*/vendor
/lib/Vendor
.php-cs-fixer.cache
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version+=master

all: appstore build-js-production

dev-setup: clean-dev npm-init
dev-setup: clean-dev composer-install-dev npm-init

release: appstore create-tag

Expand All @@ -24,6 +24,12 @@ build-js-production:
watch-js:
npm run watch

composer-install-dev:
composer install

composer-install-production:
composer install --no-dev

test:
npm run test:unit

Expand Down Expand Up @@ -54,7 +60,7 @@ js-templates:
handlebars -n OCA.External.Templates js/templates -f js/templates.js
rm -rf node_modules

appstore: clean npm-init build-js-production
appstore: clean composer-install-production npm-init build-js-production
mkdir -p $(sign_dir)
rsync -a \
--exclude=/.git \
Expand All @@ -69,6 +75,7 @@ appstore: clean npm-init build-js-production
--exclude=/tests \
--exclude=/translationfiles \
--exclude=/vendor \
--exclude=/vendor-bin \
--exclude=.php-cs-fixer.cache \
--exclude=.php-cs-fixer.dist.php \
--exclude=/composer.json \
Expand Down
52 changes: 42 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"autoload": {
"psr-4": {
"OCA\\External\\\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/christophwurst/nextcloud/OCP"
}
},
"require-dev": {
"nextcloud/coding-standard": "^1",
"vimeo/psalm": "^4.24",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpunit/phpunit": "^9.5",
"nextcloud/ocp": "dev-master"
"nextcloud/ocp": "dev-master",
"roave/security-advisories": "dev-latest"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
Expand All @@ -13,19 +20,44 @@
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"post-install-cmd": [
"@composer bin all install --ansi",
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
]
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"composer/package-versions-deprecated": true
},
"autoloader-suffix": "Talk",
"classmap-authoritative": true,
"optimize-autoloader": true,
"platform": {
"php": "7.4"
}
},
"sort-packages": true
},
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP"
"extra": {
"mozart": {
"dep_namespace": "OCA\\External\\Vendor\\",
"dep_directory": "/lib/Vendor/",
"classmap_directory": "/lib/autoload/",
"classmap_prefix": "NEXTCLOUDEXTERNALSITES_",
"packages": [
"firebase/php-jwt"
]
}
},
"require": {
"bamarni/composer-bin-plugin": "^1.8",
"firebase/php-jwt": "^6.3"
}
}
Loading