Repository navigation
65 lines (50 loc) · 2.03 KB
/
Copy pathtests.yml
File metadata and controls
65 lines (50 loc) · 2.03 KB
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
61
62
63
64
65
name: Tests
on: [push, pull_request]
env:
# pdo_sqlsrv is deliberately unpinned: no single release covers the whole matrix
# (5.13 = PHP 8.3-8.5), so let setup-php pick a compatible one
php-extensions: mbstring, intl, pdo_sqlsrv
php-tools: "composer:v2, pecl"
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
matrix:
php: ['8.4', '8.5', '8.6']
fail-fast: false
name: PHP ${{ matrix.php }} tests
steps:
- uses: actions/checkout@v7
- name: Start database containers
run: docker compose up -d --wait --quiet-pull
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.php-extensions }}
tools: ${{ env.php-tools }}
coverage: none
# pdo_sqlsrv needs the ODBC driver, which the ubuntu-24.04 image does not ship
- name: Install Microsoft ODBC driver
run: sudo apt-get update -q && sudo ACCEPT_EULA=Y apt-get install -y -q msodbcsql18
- name: Create databases.ini
run: cp ./tests/databases.docker.ini ./tests/Database/databases.ini
- run: composer install --no-progress --prefer-dist
- run: composer tester
- if: failure()
uses: actions/upload-artifact@v7
with:
name: output-${{ matrix.php }}
path: tests/**/output
lowest_dependencies:
name: Lowest Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: shivammathur/setup-php@v2
with:
php-version: 8.4
coverage: none
- name: Create databases.ini
run: cp ./tests/databases.sqlite.ini ./tests/Database/databases.ini
- run: composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable
- run: composer tester