Closed bu4ak closed 4 years ago
Do you have a phpunit.xml.dist
on your project ?
For example, I use this one:
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<rule ref="ruleset.xml"/>
<file>bin/</file>
<file>config/</file>
<file>public/</file>
<file>src/</file>
</ruleset>
Yes i have
Ok, can you try a build with this branch ?
uses: chindit/actions-phpcs@debug/missing_directory
If it works, I'll make a new release
name: phpcs
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: PHP Code Style (phpcs)
uses: chindit/actions-phpcs@debug/missing_directory
with:
# Folder to check code style
dir: src/
phpunit.xml.dist
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<rule ref="ruleset.xml"/>
<file>bin/</file>
<file>config/</file>
<file>public/</file>
<file>src/</file>
</ruleset>
Ok, problem reproduced. I'm on it.
P.S.: Of course, config file should be named phpcs.xml.dist
and not phpunit.xml.dist
. My bad.
Ok, I got your problem. Action is crashing because you haven't checked out the code.
You must add this line before :
- uses: actions/checkout@v2
Your file will look like this:
name: phpcs
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: PHP Code Style (phpcs)
uses: chindit/actions-phpcs@master
with:
# Folder to check code style
dir: src/
As far as I know, there is actually no way for an action to require another action.
So, chindit/actions-phpcs
cannot require checkout, but I will update README.md
Let me know if you still have an issue.
actions output
my config (default)