Skip to content

Commit 194a080

Browse files
committed
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.
1 parent e373045 commit 194a080

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: .github/workflows/test.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ jobs:
115115
- name: Install Composer dependencies
116116
uses: ramsey/composer-install@v1
117117

118+
- name: 'Integration test 1 - linting own code, no colors'
119+
continue-on-error: true
120+
run: ./parallel-lint --exclude vendor --exclude tests/examples --no-colors .
121+
122+
- name: 'Integration test 2 - linting own code'
123+
run: ./parallel-lint --exclude vendor --exclude tests/examples .
124+
118125
- name: 'Run unit tests PHP 5.4, 5.5'
119126
if: ${{ matrix.php < 5.6 }}
120127
run: composer testphp5
@@ -123,12 +130,6 @@ jobs:
123130
if: ${{ matrix.php >= 5.6 }}
124131
run: composer test
125132

126-
- name: 'Integration test 1 - linting own code, no colors'
127-
run: ./parallel-lint --exclude vendor --exclude tests/examples --no-colors .
128-
129-
- name: 'Integration test 2 - linting own code'
130-
run: ./parallel-lint --exclude vendor --exclude tests/examples .
131-
132133
- uses: actions/download-artifact@v2
133134
with:
134135
name: parallel-lint-phar

0 commit comments

Comments
 (0)