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

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-09-03 09:23:56 +0300
committerdartcafe <github@dartcafe.de>2020-09-03 09:23:56 +0300
commitc8031f8576245f3e00e72a879f34fb13940336b8 (patch)
tree42c41f7e9124efba1cb49e766c54ad5728371dfe
parent9692c2669541f6c1c444e074c4354f8b0fa4c583 (diff)
adding actions
-rw-r--r--.github/workflows/lint.yml51
-rw-r--r--.php_cs.cache1
-rw-r--r--.php_cs.dist20
-rw-r--r--composer.json7
4 files changed, 75 insertions, 4 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index d2bf8786..cbf985f0 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -3,12 +3,56 @@ name: Lint
on:
pull_request:
push:
- branches:
- - master
- - stable*
+ # branches:
+ # - master
+ # - stable*
jobs:
+ php-cs-fixer:
+ name: php-cs check
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php-version: [7.4]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+ - name: Set up php
+ uses: shivammathur/setup-php@master
+ with:
+ php-version: ${{ matrix.php-version }}
+ coverage: none
+ - name: Install dependencies
+ run: composer i
+ - name: Run coding standards check
+ run: composer run cs:check
+
+ app-code-check:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ nextcloud-versions: ['master']
+ name: Nextcloud ${{ matrix.nextcloud-versions }} app code check
+ steps:
+ - name: Set up php7.4
+ uses: shivammathur/setup-php@master
+ with:
+ php-version: 7.4
+ extensions: ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip
+ coverage: xdebug
+ - name: Checkout Nextcloud
+ run: git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
+ - name: Run tests
+ run: php -f nextcloud/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
+ - name: Checkout
+ uses: actions/checkout@master
+ with:
+ path: nextcloud/apps/mail
+ - name: Run tests
+ run: php -f nextcloud/occ app:check-code mail
+
node:
+ name: eslint
runs-on: ubuntu-latest
strategy:
@@ -27,6 +71,7 @@ jobs:
run: npm run lint
stylelint:
+ name: stylint
runs-on: ubuntu-latest
strategy:
diff --git a/.php_cs.cache b/.php_cs.cache
new file mode 100644
index 00000000..1754ff05
--- /dev/null
+++ b/.php_cs.cache
@@ -0,0 +1 @@
+{"php":"7.4.0","version":"2.16.4:v2.16.4#1023c3458137ab052f6ff1e09621a721bfdeca13","indent":"\t","lineEnding":"\n","rules":{"encoding":true,"full_opening_tag":true,"blank_line_after_namespace":true,"braces":{"position_after_anonymous_constructs":"same","position_after_control_structures":"same","position_after_functions_and_oop_constructs":"same"},"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":{"closure_function_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["property","method","const"]},"align_multiline_comment":true,"array_indentation":true,"array_syntax":{"syntax":"short"},"blank_line_after_opening_tag":true,"no_unused_imports":true},"hashes":{"appinfo\\app.php":4283614092,"appinfo\\routes.php":3617738371,"lib\\AppInfo\\Application.php":411266802,"lib\\Controller\\CommentApiController.php":1838790110,"lib\\Controller\\CommentController.php":287678435,"lib\\Controller\\OptionApiController.php":2650695611,"lib\\Controller\\OptionController.php":2698193769,"lib\\Controller\\PageController.php":11149671,"lib\\Controller\\PollApiController.php":4095357940,"lib\\Controller\\PollController.php":1361836821,"lib\\Controller\\PreferencesController.php":1840456828,"lib\\Controller\\ShareApiController.php":2735054074,"lib\\Controller\\ShareController.php":233260947,"lib\\Controller\\SubscriptionApiController.php":3668344078,"lib\\Controller\\SubscriptionController.php":524411373,"lib\\Controller\\SystemController.php":3151042459,"lib\\Controller\\VoteApiController.php":1304499129,"lib\\Controller\\VoteController.php":184787363,"lib\\Cron\\NotificationCron.php":838078031,"lib\\Db\\Comment.php":959534501,"lib\\Db\\CommentMapper.php":488598168,"lib\\Db\\Log.php":467194659,"lib\\Db\\LogMapper.php":731748838,"lib\\Db\\Model.php":1330893510,"lib\\Db\\Option.php":2758206078,"lib\\Db\\OptionMapper.php":2284493626,"lib\\Db\\Poll.php":939114063,"lib\\Db\\PollMapper.php":2726539906,"lib\\Db\\Preferences.php":487756418,"lib\\Db\\PreferencesMapper.php":1210335778,"lib\\Db\\Share.php":557090163,"lib\\Db\\ShareMapper.php":1787427060,"lib\\Db\\Subscription.php":3070850601,"lib\\Db\\SubscriptionMapper.php":184823745,"lib\\Db\\Vote.php":3309199093,"lib\\Db\\VoteMapper.php":2790557761,"lib\\Exceptions\\BadRequestException.php":931432988,"lib\\Exceptions\\DuplicateEntryException.php":2830273467,"lib\\Exceptions\\EmptyTitleException.php":203360807,"lib\\Exceptions\\InvalidAccessException.php":4252219543,"lib\\Exceptions\\InvalidPollTypeException.php":3622042486,"lib\\Exceptions\\InvalidShareType.php":4082190273,"lib\\Exceptions\\InvalidShowResultsException.php":3964362423,"lib\\Exceptions\\InvalidUsername.php":1047919438,"lib\\Exceptions\\NotAuthorizedException.php":1965389984,"lib\\Exceptions\\TooShortException.php":2602737521,"lib\\Exceptions\\UsernameInvalidException.php":4100052390,"lib\\Migration\\Version0009Date20181125051900.php":2716070538,"lib\\Migration\\Version0009Date20181125061900.php":456303295,"lib\\Migration\\Version0009Date20181125062101.php":1154618823,"lib\\Migration\\Version0010Date20191227063812.php":3640377530,"lib\\Migration\\Version0010Date20200119101800.php":3182457632,"lib\\Migration\\Version0101Date20200122194300.php":53872911,"lib\\Migration\\Version0103Date20200130171244.php":1626697525,"lib\\Migration\\Version0104Date20200314074611.php":2104864045,"lib\\Migration\\Version0105Date20200508211943.php":1730649166,"lib\\Migration\\Version0105Date20200523142076.php":2138369535,"lib\\Migration\\Version0105Date20200704084037.php":2068223771,"lib\\Model\\Acl.php":531907010,"lib\\Service\\AnonymizeService.php":3550297122,"lib\\Service\\CalendarService.php":4272559832,"lib\\Service\\CommentService.php":2389208710,"lib\\Service\\LogService.php":2444693224,"lib\\Service\\MailService.php":2918803077,"lib\\Service\\OptionService.php":426529911,"lib\\Service\\PollService.php":655181538,"lib\\Service\\ShareService.php":1935252203,"lib\\Service\\SubscriptionService.php":2286544594,"lib\\Service\\SystemService.php":3406319590,"lib\\Service\\VoteService.php":1188112376,"templates\\no.acc.tmpl.php":1888867333,"templates\\no.create.tmpl.php":3752463492,"templates\\no.delete.tmpl.php":2661558614,"templates\\polls.tmpl.php":1217523484,"tests\\bootstrap.php":664542409,"tests\\Integration\\AppTest.php":612480562,"tests\\Unit\\Controller\\PageControllerTest.php":2027037139,"tests\\Unit\\Db\\CommentMapperTest.php":1274084391,"tests\\Unit\\Db\\OptionMapperTest.php":2678593446,"tests\\Unit\\Db\\PollMapperTest.php":477639475,"tests\\Unit\\Db\\SubscriptionMapperTest.php":3615283060,"tests\\Unit\\Db\\VoteMapperTest.php":4124754083,"tests\\Unit\\Factories\\CommentFactory.php":3727902913,"tests\\Unit\\Factories\\OptionFactory.php":2125760214,"tests\\Unit\\Factories\\PollFactory.php":3091987037,"tests\\Unit\\Factories\\SubscriptionFactory.php":2949916965,"tests\\Unit\\Factories\\VoteFactory.php":1537210955,"tests\\Unit\\FactoryMuffin.php":3610827030,"tests\\Unit\\UnitTestCase.php":604954648,"lib\\Migration\\Version0104Date20200205104800.php":952822163}} \ No newline at end of file
diff --git a/.php_cs.dist b/.php_cs.dist
new file mode 100644
index 00000000..71fd5690
--- /dev/null
+++ b/.php_cs.dist
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+require_once './vendor/autoload.php';
+
+use Nextcloud\CodingStandard\Config;
+
+$config = new Config();
+$config
+ ->getFinder()
+ ->ignoreVCSIgnored(true)
+ ->notPath('build')
+ ->notPath('l10n')
+ ->notPath('lib/Vendor')
+ ->notPath('src')
+ ->notPath('vendor')
+ ->notPath('tests')
+ ->in(__DIR__);
+return $config;
diff --git a/composer.json b/composer.json
index 28f48e26..d1bf68de 100644
--- a/composer.json
+++ b/composer.json
@@ -27,6 +27,11 @@
"christophwurst/nextcloud": "^18.0",
"phpunit/phpunit": "^8.2",
"league/factory-muffin": "^3.0",
- "league/factory-muffin-faker": "^2.0"
+ "league/factory-muffin-faker": "^2.0",
+ "nextcloud/coding-standard": "^0.3.0"
+ },
+ "scripts": {
+ "cs:check": "php-cs-fixer fix --dry-run --diff",
+ "cs:fix": "php-cs-fixer fix"
}
}