Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/data_request.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-04-04 16:10:48 +0300
committerJoas Schilling <coding@schilljs.com>2022-04-04 16:10:48 +0300
commitde131ed517cc2f6933cc84000ebe0be35d58ebaa (patch)
treeee0d6e5ce96afd4a2731eb158e6326a64fa22292
parentc483424bc1448f6dcfbe8a360cb7e215b337f513 (diff)
Replace drone with github action
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--.drone.yml67
-rw-r--r--.github/workflows/lint-info-xml.yml31
-rw-r--r--.github/workflows/lint-php.yml47
-rw-r--r--.scrutinizer.yml118
-rw-r--r--composer.json9
5 files changed, 84 insertions, 188 deletions
diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index 14662fc..0000000
--- a/.drone.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-kind: pipeline
-name: compatibility
-
-steps:
- - name: syntax-php7.4
- image: nextcloudci/php7.4:php7.4-3
- environment:
- APP_NAME: data_request
- CORE_BRANCH: master
- DATABASEHOST: sqlite
- commands:
- - composer install
- - ./vendor/bin/parallel-lint --exclude ./vendor/ .
- - name: app-code-check
- image: nextcloudci/php7.3:php7.3-5
- environment:
- APP_NAME: data_request
- CORE_BRANCH: master
- DATABASEHOST: sqlite
- commands:
- - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST
- - cd ../server
- - ./occ app:check-code $APP_NAME
- - cd apps/$APP_NAME/
-
-trigger:
- branch:
- - master
- - stable*
- event:
- - pull_request
- - push
-
-type: docker
-
----
-kind: pipeline
-name: unit-sqlite-php7.4
-
-steps:
- - name: sqlite-php7.4
- image: nextcloudci/php7.4:php7.4-3
- environment:
- APP_NAME: data_request
- CORE_BRANCH: master
- DATABASEHOST: sqlite
- commands:
- - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST
- - cd ../server
- - ./occ app:enable $APP_NAME
- - cd apps/$APP_NAME
-
- # Run phpunit tests
- - cd tests/unit/
- - phpunit --configuration phpunit.xml
-
-trigger:
- branch:
- - master
- - stable*
- event:
- - pull_request
- - push
-
-type: docker
diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml
new file mode 100644
index 0000000..cea2a2b
--- /dev/null
+++ b/.github/workflows/lint-info-xml.yml
@@ -0,0 +1,31 @@
+# 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: Lint
+
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+ - stable*
+
+jobs:
+ xml-linters:
+ runs-on: ubuntu-latest
+
+ name: info.xml lint
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+
+ - name: Download schema
+ run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
+
+ - name: Lint info.xml
+ uses: ChristophWurst/xmllint-action@v1
+ with:
+ xml-file: ./appinfo/info.xml
+ xml-schema-file: ./info.xsd
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
new file mode 100644
index 0000000..9cfb484
--- /dev/null
+++ b/.github/workflows/lint-php.yml
@@ -0,0 +1,47 @@
+# 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: Lint
+
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+ - stable*
+
+jobs:
+ php-lint:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-versions: ["7.4", "8.0", "8.1"]
+
+ name: php-lint
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ coverage: none
+
+ - name: Lint
+ run: composer run lint
+
+ summary:
+ runs-on: ubuntu-latest
+ needs: php-lint
+
+ if: always()
+
+ name: php-lint-summary
+
+ steps:
+ - name: Summary status
+ run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
deleted file mode 100644
index d171eab..0000000
--- a/.scrutinizer.yml
+++ /dev/null
@@ -1,118 +0,0 @@
-filter:
- excluded_paths:
- - 'tests/*'
- - 'doc/*'
-
-
-tools:
- sensiolabs_security_checker: true
- php_sim: true
- php_pdepend: true
- php_analyzer: true
-
-checks:
- php:
- line_length:
- max_length: '100'
- verify_access_scope_valid: true
- require_scope_for_methods: true
- no_underscore_prefix_in_methods: true
- missing_arguments: true
- method_calls_on_non_object: true
- deprecated_code_usage: true
- no_eval: true
- parameter_doc_comments: true
- return_doc_comments: true
- fix_doc_comments: true
- return_doc_comments: true
- parameter_doc_comments: true
- more_specific_types_in_doc_comments: true
- code_rating: true
- duplication: true
- variable_existence: true
- useless_calls: true
- use_statement_alias_conflict: true
- unused_variables: true
- unused_properties: true
- unused_parameters: true
- unused_methods: true
- unreachable_code: true
- sql_injection_vulnerabilities: true
- security_vulnerabilities: true
- precedence_mistakes: true
- precedence_in_conditions: true
- parameter_non_unique: true
- no_property_on_interface: true
- no_non_implemented_abstract_methods: true
- deprecated_code_usage: true
- closure_use_not_conflicting: true
- closure_use_modifiable: true
- avoid_useless_overridden_methods: true
- avoid_conflicting_incrementers: true
- assignment_of_null_return: true
- php5_style_constructor: true
- one_class_per_file: true
- require_php_tag_first: true
- uppercase_constants: true
- require_braces_around_control_structures: true
- psr2_switch_declaration: true
- psr2_control_structure_declaration: true
- properties_in_camelcaps: true
- parameters_in_camelcaps: true
- optional_parameters_at_the_end: true
- no_underscore_prefix_in_properties: true
- no_space_inside_cast_operator: true
- no_space_before_semicolon: true
- no_short_open_tag: true
- no_goto: true
- lowercase_php_keywords: true
- lowercase_basic_constants: true
- function_in_camel_caps: true
- classes_in_camel_caps: true
- avoid_space_indentation: true
- overriding_private_members: true
- no_unnecessary_function_call_in_for_loop: true
- simplify_boolean_return: true
- javascript:
- wrap_iife: true
- no_process_exit: true
- no_process_env: true
- no_extra_semi: true
- no_extra_bind: true
- no_eval: true
- no_else_return: true
- dot_notation: true
- camelcase: true
- wrap_regex: true
- valid_typeof: true
- no_wrap_func: true
- no_use_before_define: true
- no_unreachable: true
- no_undefined: true
- no_trailing_spaces: true
- no_reserved_keys: true
- no_redeclare: true
- no_obj_calls: true
- no_loop_func: true
- no_lonely_if: true
- no_lone_blocks: true
- no_inner_declarations: true
- no_floating_decimal: true
- no_extra_boolean_cast: true
- no_empty: true
- no_dupe_keys: true
-
-coding_style:
- php:
- indentation:
- general:
- use_tabs: true
- size: 4
- spaces:
- within:
- brackets: false
- other:
- after_type_cast: false
- braces:
- classes_functions:
- class: end-of-line
diff --git a/composer.json b/composer.json
index 8d00bd3..a294fe9 100644
--- a/composer.json
+++ b/composer.json
@@ -1,5 +1,8 @@
{
- "require-dev": {
- "php-parallel-lint/php-parallel-lint": "^1.2"
- }
+ "scripts": {
+ "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-parallel-lint": "^1.2"
+ }
}