Skip to content

Commit 3b67b6a

Browse files
committed
make sure php extensions installed in phpunit github action
1 parent 39935d1 commit 3b67b6a

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

Diff for: .github/workflows/phpunit.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
name: phpunit
2-
32
on: [push]
4-
53
jobs:
64
phpunit:
75
runs-on: ubuntu-latest
86
steps:
97
- uses: actions/checkout@v3
10-
- uses: php-actions/composer@v6
11-
- uses: php-actions/phpunit@v3
8+
- name: setup PHP
9+
uses: shivammathur/setup-php@v2
10+
with:
11+
php-version: "8.3"
12+
# php extensions also listed in tools/docker-dev/web/Dockerfile
13+
extensions:
14+
- curl
15+
- mysql
16+
- ldap
17+
- pdo
18+
- redis
19+
- cli
20+
tools: composer:v2
21+
- name: Install dependencies
22+
run: composer install --prefer-dist --no-progress
23+
- name: Run PHPUnit tests
24+
run: vendor/bin/phpunit

Diff for: tools/docker-dev/web/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM ubuntu:20.04
22

33
# Web Server Setup
44
ARG DEBIAN_FRONTEND=noninteractive
5+
# php extensions also listed in .github/workflows/phpunit.yml
56
RUN apt-get update && apt-get install -y \
67
apache2 \
78
apache2-utils \
@@ -23,4 +24,4 @@ RUN sed -i '/display_errors/c\display_errors = on' /etc/php/7.4/apache2/php.ini
2324
# Start apache2 server
2425
EXPOSE 80
2526

26-
CMD ["apache2ctl", "-D", "FOREGROUND"]
27+
CMD ["apache2ctl", "-D", "FOREGROUND"]

0 commit comments

Comments
 (0)