Skip to content

Commit 549ceae

Browse files
committed
Add pipeline-check for valid codestyle using php-cs-fixer
1 parent fb76eba commit 549ceae

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
run:
14+
test:
1515
runs-on: ubuntu-18.04
1616
strategy:
1717
#for each of the following versions of PHP, with and without --prefer-lowest
@@ -86,3 +86,26 @@ jobs:
8686
- if: ${{ (matrix.php-versions == '7.1' || matrix.php-versions == '8.0') && matrix.composer-options == '' }}
8787
name: Code coverage
8888
run: bash <(curl -s https://codecov.io/bash)
89+
90+
lint:
91+
runs-on: ubuntu-18.04
92+
name: Lint
93+
steps:
94+
#sets up the correct version of PHP with necessary config options
95+
- name: Setup PHP with Xdebug
96+
uses: shivammathur/setup-php@v2
97+
with:
98+
php-version: 8.1
99+
ini-values: xdebug.overload_var_dump=0, memory_limit=4G, phar.readonly=false
100+
101+
#checkout the codebase from github
102+
- name: Checkout codebase
103+
uses: actions/checkout@v2
104+
105+
#get dependencies
106+
- name: Install dependencies
107+
run: composer update --working-dir=tools/php-cs-fixer --no-interaction
108+
109+
#run tests
110+
- name: Lint codestyle using php-cs-fixer
111+
run: tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --verbose --dry-run

0 commit comments

Comments
 (0)