diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1eae2a9..957775f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ jobs: uses: ./.github/workflows/prettier.yml with: pattern: "**/*.yml" + test-beautysh: name: Test workflow (beautysh) needs: format @@ -19,6 +20,7 @@ jobs: with: dir: tests/workflows params: --force-function-style fnpar --indent-size 2 + test-mkdocs: name: Test workflow (mkdocs) needs: format @@ -26,18 +28,21 @@ jobs: with: plugins: mkdocs-literate-nav params: --strict + test-php-cs-fixer: name: Test workflow (php-cs-fixer) needs: format uses: ./.github/workflows/php-cs-fixer.yml with: - params: --dry-run -v --allow-risky=yes --rules=@PSR12:risky . + params: --dry-run -v --rules=@Symfony . + test-prettier: name: Test workflow (prettier) needs: format uses: ./.github/workflows/prettier.yml with: pattern: "**/*.json" + test-shellcheck: name: Test workflow (shellcheck) needs: format diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 613dcba..72a8fd2 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -18,8 +18,8 @@ jobs: - name: Install php-cs-fixer uses: shivammathur/setup-php@v2 with: - php-version: 7.4 - tools: php-cs-fixer:3.38.2 + php-version: 8.3 + tools: php-cs-fixer:3.75 - name: Check code-style run: php-cs-fixer fix ${{ inputs.params }} diff --git a/tests/workflows/test.php b/tests/workflows/test.php index a9b9c43..8a24a8e 100644 --- a/tests/workflows/test.php +++ b/tests/workflows/test.php @@ -5,24 +5,22 @@ */ class Mock { - /** - * @var string - */ - protected string $message; + public const string ERROR_MSG = 'oh no!'; - /** - * @param string $message - */ - public function __construct(string $message) + public function __construct(protected string $message) { - $this->message = $message; } - /** - * @return string - */ public function getMessage(): string { return $this->message; } + + /** + * This should be called on error. + */ + protected function error(): never + { + throw new Exception(self::ERROR_MSG); + } }