9393 if : matrix.php-versions == '8.5'
9494 run : go mod tidy -diff
9595 working-directory : caddy/
96+ integration-tests :
97+ name : Integration Tests (Linux, PHP ${{ matrix.php-versions }})
98+ runs-on : ubuntu-latest
99+ strategy :
100+ fail-fast : false
101+ matrix :
102+ php-versions : ["8.3", "8.4"]
103+ steps :
104+ - uses : actions/checkout@v5
105+ with :
106+ persist-credentials : false
107+ - uses : actions/setup-go@v6
108+ with :
109+ go-version : " 1.25"
110+ cache-dependency-path : |
111+ go.sum
112+ caddy/go.sum
113+ - uses : shivammathur/setup-php@v2
114+ with :
115+ php-version : ${{ matrix.php-versions }}
116+ ini-file : development
117+ coverage : none
118+ tools : none
119+ env :
120+ phpts : ts
121+ debug : true
122+ - name : Install PHP development libraries
123+ run : sudo apt-get update && sudo apt-get install -y libkrb5-dev libsodium-dev libargon2-dev
124+ - name : Install xcaddy
125+ run : go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
126+ - name : Download PHP sources
127+ run : |
128+ PHP_VERSION=$(php -r "echo PHP_VERSION;")
129+ wget -q "https://www.php.net/distributions/php-${PHP_VERSION}.tar.gz"
130+ tar xzf "php-${PHP_VERSION}.tar.gz"
131+ echo "GEN_STUB_SCRIPT=${PWD}/php-${PHP_VERSION}/build/gen_stub.php" >> "${GITHUB_ENV}"
132+ - name : Set CGO flags
133+ run : |
134+ echo "CGO_CFLAGS=$(php-config --includes)" >> "${GITHUB_ENV}"
135+ echo "CGO_LDFLAGS=$(php-config --ldflags) $(php-config --libs)" >> "${GITHUB_ENV}"
136+ - name : Run integration tests
137+ working-directory : internal/extgen/
138+ run : go test -tags integration -v -timeout 30m
96139 tests-mac :
97140 name : Tests (macOS, PHP 8.5)
98141 runs-on : macos-latest
@@ -106,7 +149,7 @@ jobs:
106149 with :
107150 go-version : " 1.25"
108151 cache-dependency-path : |
109- go.sum
152+ go.sum
110153 caddy/go.sum
111154 - uses : shivammathur/setup-php@v2
112155 with :
0 commit comments