Skip to content

Commit 4052923

Browse files
committed
Temporary: probe wordpress.org version-check API from CI
1 parent 52041f6 commit 4052923

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

‎.github/workflows/testing.yml‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,31 @@ on:
1111
- cron: '17 1 * * *' # Run every day on a seemly random time.
1212

1313
jobs:
14-
test:
15-
uses: wp-cli/.github/.github/workflows/reusable-testing.yml@main
14+
debug:
15+
name: Debug WordPress.org version-check API
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Probe version-check API
19+
run: |
20+
probe() {
21+
echo "===== version=$1 ====="
22+
curl -sS "https://api.wordpress.org/core/version-check/1.7/?version=$1&locale=en_US&php=8.2.0&mysql=8.0.0" \
23+
| python3 -c "
24+
import json,sys
25+
d = json.load(sys.stdin)
26+
offers = d.get('offers', [])
27+
print('offer count:', len(offers))
28+
for o in offers:
29+
print(' response=%-12s version=%-10s current=%-10s partial=%s' % (
30+
o.get('response'), o.get('version'), o.get('current'),
31+
(o.get('packages') or {}).get('partial')))
32+
"
33+
}
34+
for v in 5.8 6.2.5 6.5 6.9 7.0 7.0.3 7.1; do probe "$v"; done
35+
echo "===== no version param (global branch list) ====="
36+
curl -sS "https://api.wordpress.org/core/version-check/1.7/" \
37+
| python3 -c "
38+
import json,sys
39+
d = json.load(sys.stdin)
40+
print([o.get('version') for o in d.get('offers', [])])
41+
"

0 commit comments

Comments
 (0)