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