From c8b6db9dcd54cf78caad4220970d4c939e611fd1 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 28 Mar 2021 15:14:45 +0200 Subject: [PATCH] GH Actions: switch execution order of unit vs integration tests ... and add `continue-on-error` to the first of the integration tests. If/when any of the tests fail, execution of the `Test` job will stop. Now, if there is a parse error in the code of any of the Parallel Lint files, with the test execution order as it was, that means the job would already fail on the running of the unit tests and stop there. However to identify the parse error, the integration tests are more useful, so with that in mind, those will now be run first. Secondly, if there is a parse error, the first integration test would fail and the second (with colours) would never get executed, while especially in the case of a parse error in the Parallel Lint code itself, it is useful to see the output of both these integration tests. So, with that in mind, I've set the first of the two to `continue-on-error`. As the second integration test would fail anyway, this will never negatively impact the workflow success/failure marking in the end, while it does allow us to see the output of both integration test steps. --- .github/workflows/test.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b92c455..99633a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -115,6 +115,13 @@ jobs: - name: Install Composer dependencies uses: ramsey/composer-install@v1 + - name: 'Integration test 1 - linting own code, no colors' + continue-on-error: true + run: ./parallel-lint --exclude vendor --exclude tests/examples --no-colors . + + - name: 'Integration test 2 - linting own code' + run: ./parallel-lint --exclude vendor --exclude tests/examples . + - name: 'Run unit tests PHP 5.4, 5.5' if: ${{ matrix.php < 5.6 }} run: composer testphp5 @@ -123,12 +130,6 @@ jobs: if: ${{ matrix.php >= 5.6 }} run: composer test - - name: 'Integration test 1 - linting own code, no colors' - run: ./parallel-lint --exclude vendor --exclude tests/examples --no-colors . - - - name: 'Integration test 2 - linting own code' - run: ./parallel-lint --exclude vendor --exclude tests/examples . - - uses: actions/download-artifact@v2 with: name: parallel-lint-phar