From 17142d868f7432f70835018333d1aa650392382b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 19 Aug 2023 08:40:15 +0100 Subject: [PATCH] feat(github-actions): run tests first The tests are the most valuable part of the CI pipeline, so these should be run first. If a PHPCS or PHPStan error occurs but the tests pass, we know the functionality works and the error can be addressed. If a test fails, the CI pipeline will fail sooner. In the future, the tasks could be split into separate jobs though it would need to be done in a way that doesn't add a lot of repetition. Refs: OD-41 --- templates/ci/github-actions/ci.yml.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ci/github-actions/ci.yml.twig b/templates/ci/github-actions/ci.yml.twig index 8f3987e..b23d7d2 100644 --- a/templates/ci/github-actions/ci.yml.twig +++ b/templates/ci/github-actions/ci.yml.twig @@ -40,6 +40,8 @@ jobs: just composer install --quiet --no-progress + just test --testdox --colors=always + {% if "phpcs" in php|keys -%} just _run php phpcs {%- endif %} @@ -47,5 +49,3 @@ jobs: {% if "phpstan" in php|keys -%} just _run php phpstan analyze --no-progress --memory-limit=512M {%- endif %} - - just test --testdox --colors=always