-
Notifications
You must be signed in to change notification settings - Fork 83
60 lines (50 loc) · 1.75 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: PHPUnit
on:
push:
pull_request:
schedule:
- cron: '45 3 * * SUN'
jobs:
run:
runs-on: ${{ matrix.operating-system }}
container: shivammathur/node:latest-${{ matrix.arch }}
strategy:
matrix:
arch: ["amd64", "i386"]
operating-system: [ubuntu-latest]
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php-extensions: ['bcmath', 'gmp']
exclude:
# We are getting weird libxml2 failures on this combo
- arch: "i386"
php: 8.4
name: "PHP ${{ matrix.php-versions }} (with ${{ matrix.php-extensions }}) test on ${{ matrix.operating-system }}/${{ matrix.arch }}"
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: "mbstring, intl, ${{ matrix.php-extensions }}"
tools: "composer, phpize"
- name: Checkout
# We use v1 due to https://github.com/actions/checkout/issues/334
uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libmaxminddb-dev
- name: Build extension
run: |
cd ext
phpize
./configure --with-maxminddb --enable-maxminddb-debug
make clean
make
NO_INTERACTION=1 make test
cd ..
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Test with phpunit without extension
run: vendor/bin/phpunit
- name: Test with phpunit using extension
run: php -d extension=ext/modules/maxminddb.so vendor/bin/phpunit