Skip to content

Commit 7f26ed2

Browse files
committed
test with windows-ci
1 parent 1684c52 commit 7f26ed2

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
name: Setup Caddy server
2+
inputs:
3+
arch:
4+
default: 'LINUX_X64'
5+
required: true
6+
description: "Set LINUX_X64 or WINDOWS (which are job names of the push.yml workflows)"
27
runs:
38
using: composite
49
steps:
510
- shell: bash
11+
if: inputs.arch == 'LINUX_X64'
612
env:
713
GH_TOKEN: ${{ github.token }}
814
run: |
@@ -11,3 +17,13 @@ runs:
1117
sudo chmod +x /usr/bin/caddy
1218
sudo caddy start --config ext/curl/tests/Caddyfile
1319
continue-on-error: true
20+
- shell: pwsh
21+
if: inputs.arch == 'WINDOWS'
22+
env:
23+
GH_TOKEN: ${{ github.token }}
24+
run: |
25+
gh release -R caddyserver/caddy download --pattern 'caddy_*_windows_amd64.zip' --output caddy.zip
26+
Expand-Archive -Path caddy.zip -DestinationPath ./build/caddy -Force
27+
./build/caddy/caddy.exe trust
28+
./build/caddy/caddy.exe start --config ext/curl/tests/Caddyfile
29+
continue-on-error: true

.github/workflows/push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
uses: ./.github/actions/setup-mssql
9999
- name: Setup Caddy server
100100
uses: ./.github/actions/setup-caddy
101+
with:
102+
arch: LINUX_X64
101103
- name: ccache
102104
uses: hendrikmuhs/[email protected]
103105
with:
@@ -254,6 +256,10 @@ jobs:
254256
run: git config --global core.autocrlf false && git config --global core.eol lf
255257
- name: git checkout
256258
uses: actions/checkout@v4
259+
- name: Setup Caddy server
260+
uses: ./.github/actions/setup-caddy
261+
with:
262+
arch: WINDOWS
257263
- name: Setup
258264
uses: ./.github/actions/setup-windows
259265
- name: Build

ext/curl/tests/Caddyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ respond /serverpush/pushed "pushed response"
1313
push /serverpush /serverpush/pushed
1414

1515
route /show_upload_size {
16-
templates
17-
respond `Content-length: ={{.Req.Header.Get "Content-length"}}=`
16+
templates
17+
respond `Content-length: ={{.Req.Header.Get "Content-length"}}=`
1818
}
1919

2020
basic_auth /http-basic-auth {

0 commit comments

Comments
 (0)