diff --git a/.github/workflows/phpcs_psr12.yml b/.github/workflows/phpcs_psr12.yml new file mode 100644 index 0000000..6ecfb15 --- /dev/null +++ b/.github/workflows/phpcs_psr12.yml @@ -0,0 +1,21 @@ +name: "CI" + +on: [workflow_dispatch, pull_request] + +jobs: + phpcs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + 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 + - name: Install PHP_CodeSniffer + run: | + curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar + php phpcs.phar --version + + - name: Run phpcs + run: php phpcs.phar --standard=PSR12 html