Skip to content

Commit

Permalink
GH Actions: switch execution order of unit vs integration tests
Browse files Browse the repository at this point in the history
... 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.
  • Loading branch information
jrfnl authored and grogy committed Mar 30, 2021
1 parent b770fe3 commit c8b6db9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c8b6db9

Please sign in to comment.