Skip to content

Commit 11401c3

Browse files
committed
better Caddy install and detection
1 parent 4ce7676 commit 11401c3

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

.github/actions/setup-caddy/action.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@ runs:
44
steps:
55
- shell: bash
66
run: |
7-
sudo apt-get install -y debian-keyring debian-archive-keyring apt-transport-https
8-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
9-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
10-
sudo apt-get update
11-
sudo apt-get install -y caddy
12-
7+
sudo curl 'https://caddyserver.com/api/download?os=linux&arch=amd64' > /usr/bin/caddy
138
sudo caddy start --config ext/curl/tests/Caddyfile

ext/curl/tests/bug76675.phpt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ Bug #76675 (Segfault with H2 server push write/writeheader handlers)
44
curl
55
--SKIPIF--
66
<?php
7-
$curl = curl_init();
8-
curl_setopt($curl, CURLOPT_URL, "https://localhost/serverpush");
9-
$data = curl_exec($curl);
10-
curl_close($curl);
11-
if (!$data) {
7+
if (!fsockopen("localhost", 443, $errno, $errstr, 0.5)) {
128
die("skip test needing Caddy");
139
}
1410
$curl_version = curl_version();

ext/curl/tests/bug77535.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Bug #77535 (Invalid callback, h2 server push)
44
curl
55
--SKIPIF--
66
<?php
7-
if (!getenv("RUN_CADDY_TESTS")) {
7+
if (!fsockopen("localhost", 443, $errno, $errstr, 0.5)) {
88
die("skip test needing Caddy");
99
}
1010
$curl_version = curl_version();

ext/curl/tests/curl_pushfunction.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Test CURLMOPT_PUSHFUNCTION
44
curl
55
--SKIPIF--
66
<?php
7-
if (!getenv("RUN_CADDY_TESTS")) {
7+
if (!fsockopen("localhost", 443, $errno, $errstr, 0.5)) {
88
die("skip test needing Caddy");
99
}
1010
$curl_version = curl_version();

0 commit comments

Comments
 (0)