Skip to content

Commit 648d274

Browse files
committed
ci: Run perl tests
1 parent c722cfb commit 648d274

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
--with-port=8000
165165
sudo make
166166
sudo make install
167-
- name: Build mod_proxy_cluster
167+
- name: Build mod_proxy_cluster and add it to httpd
168168
run: |
169169
ls
170170
cd mod_proxy_cluster/native
@@ -174,8 +174,15 @@ jobs:
174174
./configure CFLAGS="-Wall -Werror" --with-apxs=/usr/local/apache2/bin/apxs; \
175175
make clean; \
176176
make || exit 1; \
177+
sudo cp *.so /usr/local/apache2/modules; \
177178
cd ..; \
178179
done;
180+
- name: Preserve built Apache for perl-test job
181+
uses: actions/upload-artifact@v4
182+
with:
183+
name: apache-trunk
184+
path: /usr/local/apache2
185+
retention-days: 0
179186

180187
cmake-windows-latest:
181188
runs-on: windows-latest
@@ -259,6 +266,49 @@ jobs:
259266
test/logs/*
260267
retention-days: 7
261268

269+
perl-tests:
270+
runs-on: ubuntu-latest
271+
needs: make-with-httpd-trunk
272+
steps:
273+
- name: Checkout
274+
uses: actions/checkout@v4
275+
- name: Setup dependencies
276+
run: |
277+
sudo apt update
278+
sudo apt remove apache2*
279+
sudo apt install -y gcc make perl cpanminus libcrypt-ssleay-perl
280+
- name: Get Apache built in the previous job
281+
uses: actions/download-artifact@v4
282+
with:
283+
name: apache-trunk
284+
path: apache2
285+
- name: Put httpd on the right path
286+
run: |
287+
mkdir test-perl/t/modules/
288+
cp apache2/modules/{mod_proxy_cluster.so,mod_manager.so,mod_advertise.so,mod_lbmethod_cluster.so} test-perl/t/modules/
289+
sudo mv apache2/ /usr/local/apache2/
290+
sudo chmod -R 755 /usr/local/apache2/
291+
- name: Install perl modules
292+
run: |
293+
sudo cpanm --force Apache::Test Apache::TestMM HTTP::Request LWP::UserAgent
294+
- name: Run testsuite
295+
run: |
296+
cd test-perl
297+
perl Makefile.PL -httpd /usr/local/apache2/bin/httpd
298+
make
299+
t/TEST -httpd /usr/local/apache2/bin/httpd 2>&1 | tee test-perl.log
300+
mv test-perl.log t/logs/test-perl.log
301+
grep "Result: PASS" -q t/logs/test-perl.log
302+
exit $?
303+
- name: Preserve test logs
304+
uses: actions/upload-artifact@v4
305+
if: always()
306+
with:
307+
name: Perl tests logs
308+
path: |
309+
test-perl/t/logs/*
310+
retention-days: 7
311+
262312
doxygen:
263313
runs-on: ubuntu-latest
264314
steps:

0 commit comments

Comments
 (0)