Skip to content

Commit 5042203

Browse files
authored
Expand PHP test coverage to PHP 7.2, 7.3 and 7.4 (auth0#458)
* Fix Composer V2 compatibility * Add 7.2, 7.3 and 7.4 PHP tests to continuous integration
1 parent ccead4f commit 5042203

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

.circleci/config.yml

+33-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ commands:
2424
steps:
2525
- run: composer test-unit-ci
2626
- store_artifacts:
27-
path: build/coverage.xml
27+
path: build/coverage.xml
2828
run-integration-tests:
2929
steps:
3030
- run: composer test-integration-ci
3131
- store_artifacts:
32-
path: build/coverage.xml
32+
path: build/coverage.xml
3333

3434
jobs:
3535
php_7:
@@ -41,6 +41,33 @@ jobs:
4141
- run:
4242
command: bash <(curl -s https://codecov.io/bash)
4343
when: on_success
44+
php_7_2:
45+
docker:
46+
- image: circleci/php:7.2
47+
steps:
48+
- prepare
49+
- run-unit-tests
50+
- run:
51+
command: bash <(curl -s https://codecov.io/bash)
52+
when: on_success
53+
php_7_3:
54+
docker:
55+
- image: circleci/php:7.3
56+
steps:
57+
- prepare
58+
- run-unit-tests
59+
- run:
60+
command: bash <(curl -s https://codecov.io/bash)
61+
when: on_success
62+
php_7_4:
63+
docker:
64+
- image: circleci/php:7.4
65+
steps:
66+
- prepare
67+
- run-unit-tests
68+
- run:
69+
command: bash <(curl -s https://codecov.io/bash)
70+
when: on_success
4471
php_7_integration_tests:
4572
docker:
4673
- image: circleci/php:7.1
@@ -66,6 +93,9 @@ workflows:
6693
build-and-test:
6794
jobs:
6895
- php_7
96+
- php_7_2
97+
- php_7_3
98+
- php_7_4
6999
- snyk:
70100
# Must define SNYK_TOKEN env
71101
context: snyk-env
@@ -77,4 +107,4 @@ workflows:
77107
filters:
78108
branches:
79109
only:
80-
- master
110+
- master

codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ coverage:
1919
default:
2020
enabled: true
2121
if_no_uploads: error
22-
comment: false
22+
comment: false

composer.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"josegonzalez/dotenv": "^2.0",
2323
"squizlabs/php_codesniffer": "^3.2",
2424
"phpcompatibility/php-compatibility": "^8.1",
25-
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
25+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
2626
"cache/array-adapter": "^1.0"
2727
},
2828
"autoload": {
@@ -47,6 +47,10 @@
4747
"compat": "\"vendor/bin/phpcs\" --standard=.phpcs-compat.xml.dist",
4848
"sniffs": "\"vendor/bin/phpcs\" -e",
4949
"config-phpcs": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
50-
"pre-commit": [ "@test", "@compat", "@phpcbf" ]
50+
"pre-commit": [
51+
"@test",
52+
"@compat",
53+
"@phpcbf"
54+
]
5155
}
5256
}

0 commit comments

Comments
 (0)