Skip to content

Commit

Permalink
chore(next): simplify phpcs task in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Oct 17, 2023
1 parent 7cd48e8 commit 6b7d7a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ jobs:
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require --dev phpspec/prophecy-phpunit:^2 -W
if: ${{ startsWith(matrix.drupal, '9') }}
- name: Run phpcs
run: |
~/drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml modules/next
- name: Copy module
run: cp -R ../next-drupal/modules/next ~/drupal/web/modules/next
- name: Run php built-in server
run: php -S 127.0.0.1:8080 -t ~/drupal/web &
- name: Run phpcs
run: |
cd ~/drupal/web
cp modules/next/phpcs.xml.dist .
../vendor/bin/phpcs -p -s --colors --standard=./phpcs.xml.dist modules/next
- name: Run PHPUnit
run: |
cd ~/drupal/web
Expand Down
6 changes: 1 addition & 5 deletions modules/next/phpcs.xml.dist → modules/next/phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Drupal coding standards">
<exclude-pattern>*/.git/*</exclude-pattern>
<exclude-pattern>*/config/*</exclude-pattern>
<exclude-pattern>*/css/*</exclude-pattern>
<exclude-pattern>*/js/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>\.md</exclude-pattern>

<rule ref="Drupal"/>
</ruleset>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"prepare": "lerna run prepare && husky install",
"watch": "lerna run watch",
"lint": "eslint --cache --ext .js,.jsx,.ts,.tsx .",
"phpcs": "./drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml.dist modules/next",
"phpcs": "./drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml modules/next",
"test:next": "./drupal/vendor/bin/phpunit -c ./drupal/web modules/next",
"sync:modules": "./scripts/sync-modules.sh \"modules/*\"",
"sync:examples": "./scripts/sync-examples.sh \"examples/example-*\"",
Expand Down

0 comments on commit 6b7d7a3

Please sign in to comment.