Skip to content

Commit 870f19d

Browse files
authored
Update Pest to v4 (#28)
1 parent 3bc8692 commit 870f19d

File tree

8 files changed

+5723
-87
lines changed

8 files changed

+5723
-87
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,23 @@ jobs:
5757
with:
5858
dependency-versions: highest
5959

60-
- run: composer pest:unit -- --ci --coverage-clover coverage-unit.xml
61-
if: ${{ matrix.coverage == 'xdebug' }}
6260

63-
- run: composer pest:unit -- --ci
64-
if: ${{ matrix.coverage != 'xdebug' }}
6561

66-
- run: composer pest:feature -- --ci
67-
- run: composer pest:e2e -- --ci
62+
- run: composer pest:unit -- ${COVERAGE} --ci
63+
env:
64+
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }}
65+
- run: composer pest:feature -- ${COVERAGE} --ci
66+
env:
67+
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }}
68+
- run: composer pest:e2e -- ${COVERAGE} --ci
69+
env:
70+
COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-e2e.xml' || '' }}
6871

6972
- uses: actions/upload-artifact@v4
7073
if: ${{ matrix.coverage == 'xdebug' }}
7174
with:
7275
name: coverage
73-
path: coverage-unit.xml
76+
path: coverage-*.xml
7477

7578
codecov:
7679
needs: pest
@@ -91,3 +94,19 @@ jobs:
9194
disable_search: true
9295
files: coverage-unit.xml
9396
flags: unit
97+
98+
- uses: codecov/codecov-action@v5
99+
with:
100+
use_oidc: true
101+
fail_ci_if_error: true
102+
disable_search: true
103+
files: coverage-feature.xml
104+
flags: feature
105+
106+
- uses: codecov/codecov-action@v5
107+
with:
108+
use_oidc: true
109+
fail_ci_if_error: true
110+
disable_search: true
111+
files: coverage-e2e.xml
112+
flags: e2e

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
### Composer template
2-
composer.phar
3-
composer.lock
4-
/vendor/
5-
/coverage.xml
1+
# Composer
2+
/vendor
3+
4+
# Pest
5+
/coverage*.xml

composer.json

Lines changed: 61 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,65 @@
11
{
2-
"name": "typisttech/wordfence-api",
3-
"description": "Fetch WordPress vulnerability information from Wordfence vulnerability data feed.",
4-
"license": "MIT",
5-
"keywords": [
6-
"security",
7-
"wordfence",
8-
"wordpress"
9-
],
10-
"authors": [
11-
{
12-
"name": "Typist Tech",
13-
"email": "wordfence-api@typist.tech",
14-
"homepage": "https://typist.tech/"
2+
"name": "typisttech/wordfence-api",
3+
"description": "Fetch WordPress vulnerability information from Wordfence vulnerability data feed.",
4+
"license": "MIT",
5+
"keywords": [
6+
"security",
7+
"wordfence",
8+
"wordpress"
9+
],
10+
"authors": [
11+
{
12+
"name": "Typist Tech",
13+
"email": "wordfence-api@typist.tech",
14+
"homepage": "https://typist.tech/"
15+
},
16+
{
17+
"name": "Tang Rufus",
18+
"email": "tangrufus@gmail.com",
19+
"homepage": "https://typist.tech/",
20+
"role": "Developer"
21+
}
22+
],
23+
"homepage": "https://github.com/typisttech/wordfence-api",
24+
"support": {
25+
"email": "wordfence-api@typist.tech",
26+
"issues": "https://github.com/typisttech/wordfence-api/issues",
27+
"source": "https://github.com/typisttech/wordfence-api"
1528
},
16-
{
17-
"name": "Tang Rufus",
18-
"email": "tangrufus@gmail.com",
19-
"homepage": "https://typist.tech/",
20-
"role": "Developer"
21-
}
22-
],
23-
"homepage": "https://github.com/typisttech/wordfence-api",
24-
"support": {
25-
"email": "wordfence-api@typist.tech",
26-
"issues": "https://github.com/typisttech/wordfence-api/issues",
27-
"source": "https://github.com/typisttech/wordfence-api"
28-
},
29-
"require": {
30-
"php": "^8.3",
31-
"composer/semver": "^3.4",
32-
"guzzlehttp/guzzle": "^7.9"
33-
},
34-
"require-dev": {
35-
"mockery/mockery": "^1.6",
36-
"pestphp/pest": "^3.5",
37-
"roave/security-advisories": "dev-latest"
38-
},
39-
"autoload": {
40-
"psr-4": {
41-
"TypistTech\\WordfenceApi\\": "src/"
42-
}
43-
},
44-
"autoload-dev": {
45-
"psr-4": {
46-
"Tests\\": "tests/"
47-
}
48-
},
49-
"config": {
50-
"allow-plugins": {
51-
"pestphp/pest-plugin": true
29+
"require": {
30+
"php": "^8.3",
31+
"composer/semver": "^3.4",
32+
"guzzlehttp/guzzle": "^7.9"
5233
},
53-
"sort-packages": true
54-
},
55-
"scripts": {
56-
"fixture:download": [
57-
"curl -o ./tests/fixtures/vulnerabilities.production.json https://www.wordfence.com/api/intelligence/v2/vulnerabilities/production",
58-
"curl -o ./tests/fixtures/vulnerabilities.scanner.json https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner"
59-
],
60-
"pest:e2e": "pest -d memory_limit=512M --group=e2e",
61-
"pest:feature": "pest -d memory_limit=640M --group=feature",
62-
"pest:unit": "pest --group=unit",
63-
"test": [
64-
"@composer normalize --dry-run",
65-
"pint --test",
66-
"XDEBUG_MODE=off pest -d memory_limit=640M"
67-
]
68-
}
34+
"require-dev": {
35+
"mockery/mockery": "^1.6",
36+
"pestphp/pest": "^4.1",
37+
"roave/security-advisories": "dev-latest"
38+
},
39+
"autoload": {
40+
"psr-4": {
41+
"TypistTech\\WordfenceApi\\": "src/"
42+
}
43+
},
44+
"autoload-dev": {
45+
"psr-4": {
46+
"Tests\\": "tests/"
47+
}
48+
},
49+
"config": {
50+
"allow-plugins": {
51+
"pestphp/pest-plugin": true
52+
},
53+
"sort-packages": true
54+
},
55+
"scripts": {
56+
"fixture:download": [
57+
"curl -o ./tests/Fixtures/vulnerabilities.production.json https://www.wordfence.com/api/intelligence/v2/vulnerabilities/production",
58+
"curl -o ./tests/Fixtures/vulnerabilities.scanner.json https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner"
59+
],
60+
"pest": "pest -d memory_limit=512M",
61+
"pest:e2e": "pest -d memory_limit=512M --group=e2e",
62+
"pest:feature": "pest -d memory_limit=512M --group=feature",
63+
"pest:unit": "pest --group=unit"
64+
}
6965
}

0 commit comments

Comments
 (0)