diff --git a/.github/workflows/tests-and-phpcs.yml b/.github/workflows/tests-and-phpcs.yml new file mode 100644 index 0000000..defc6bb --- /dev/null +++ b/.github/workflows/tests-and-phpcs.yml @@ -0,0 +1,22 @@ +name: Run Tests and PHPCS + +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" +jobs: + RunTestsAndPHPCS: + name: Run-Tests-And-PHPCS + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: php-actions/composer@v6 + - uses: php-actions/composer@v6 + with: + command: check-code + - uses: php-actions/composer@v6 + with: + command: test diff --git a/composer.json b/composer.json index 22e60e5..c05341a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "phpunit/phpunit": "^11.0" }, "scripts": { - "check-code": "phpcs -s ./index.php", + "check-code": "phpcs -s ./index.php && phpcs -s adder.php && phpcs -s ./tests", "test": "phpunit ./tests" } }