diff --git a/.github/workflows/phpcs_psr12.yml b/.github/workflows/phpcs_psr12.yml index 6ecfb15..7969266 100644 --- a/.github/workflows/phpcs_psr12.yml +++ b/.github/workflows/phpcs_psr12.yml @@ -3,19 +3,15 @@ name: "CI" on: [workflow_dispatch, pull_request] jobs: - phpcs: + phpcs_psr12: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: - fetch-depth: 0 # important! - - # we may use whatever way to install phpcs, just specify the path on the next step - # however, curl seems to be the fastest + fetch-depth: 0 - name: Install PHP_CodeSniffer - run: | - curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar - php phpcs.phar --version - + run: sudo apt-get -y install php-codesniffer + - name: Set phpcs to ignore warnings in return value + run: phpcs --config-set ignore_warnings_on_exit 1 - name: Run phpcs - run: php phpcs.phar --standard=PSR12 html + run: phpcs --standard=PSR12 html