Skip to content

Commit 3a0f8ce

Browse files
committed
GH Actions: run the tests against all supported PHP versions
The original Travis script ran the following commands against *all* supported PHP versions, but didn't test the phar: ```yaml - composer test - ./parallel-lint --exclude vendor --exclude tests/examples --no-colors . - ./parallel-lint --exclude vendor --exclude tests/examples . ``` The current `test` job only ran the unit tests against PHP 5.4. It did not run the integration test (running Parallel Lint against its own code) via a direct call to the script anymore at all. The integration test was basically now _only_ being run for the phar and only in one flavour, though it did do that on all supported PHP versions. This commit: * Removes the job which only ran the unit tests against PHP 5.4. * Adds the running of the above three commands (unit tests and two versions of integrations tests runs via a direct call to the script), to the job which also runs the integration tests via the phar file. * Updates the command line parameters used for the phar run to be the same as those used for the direct script call integration tests.
1 parent 4e3e88c commit 3a0f8ce

File tree

1 file changed

+20
-28
lines changed

1 file changed

+20
-28
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,6 @@ jobs:
2828
- name: Run code sniffer
2929
run: vendor/bin/phpcs
3030

31-
test:
32-
name: Run unit tests
33-
runs-on: ubuntu-latest
34-
35-
steps:
36-
- name: Setup PHP
37-
uses: shivammathur/setup-php@v2
38-
with:
39-
php-version: 5.4
40-
extensions: json, tokenizer
41-
42-
- name: Checkout code
43-
uses: actions/checkout@v2
44-
45-
- name: Install Composer dependencies
46-
uses: ramsey/composer-install@v1
47-
48-
- name: Run tests
49-
run: composer test
50-
5131
bundle:
5232
name: Bundle binary
5333
runs-on: ubuntu-latest
@@ -84,8 +64,8 @@ jobs:
8464
name: parallel-lint-phar
8565
path: ./parallel-lint.phar
8666

87-
verify-bundle:
88-
name: Validate binary on PHP ${{ matrix.php }}
67+
test:
68+
name: Run tests on PHP ${{ matrix.php }}
8969
runs-on: ubuntu-latest
9070
continue-on-error: ${{ matrix.experimental == true }}
9171
needs:
@@ -113,15 +93,27 @@ jobs:
11393
- name: Checkout code
11494
uses: actions/checkout@v2
11595

116-
- uses: actions/download-artifact@v2
117-
with:
118-
name: parallel-lint-phar
119-
12096
- name: Setup PHP
12197
uses: shivammathur/setup-php@v2
12298
with:
12399
php-version: ${{ matrix.php }}
124100
coverage: none
125101

126-
- name: Run linter against codebase
127-
run: php ./parallel-lint.phar src/
102+
- name: Install Composer dependencies
103+
uses: ramsey/composer-install@v1
104+
105+
- name: Run unit tests
106+
run: composer test
107+
108+
- name: 'Integration test 1 - linting own code, no colors'
109+
run: ./parallel-lint --exclude vendor --exclude tests/examples --no-colors .
110+
111+
- name: 'Integration test 2 - linting own code'
112+
run: ./parallel-lint --exclude vendor --exclude tests/examples .
113+
114+
- uses: actions/download-artifact@v2
115+
with:
116+
name: parallel-lint-phar
117+
118+
- name: Run linter against codebase using the phar
119+
run: php ./parallel-lint.phar --exclude vendor --exclude tests/examples .

0 commit comments

Comments
 (0)