forked from doctrine/dbal
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.96 KB
/
phpunit-db2.yml
File metadata and controls
68 lines (58 loc) · 1.96 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
66
67
68
name: PHPUnit with Db2
on:
workflow_call:
inputs:
php-version:
required: true
type: string
jobs:
phpunit-db2:
runs-on: ubuntu-24.04
services:
db2:
image: icr.io/db2_community/db2:11.5.8.0
ports:
- '50000:50000'
env:
DB2INSTANCE: db2inst1
DB2INST1_PASSWORD: Doctrine2018
LICENSE: accept
DBNAME: doctrine
options: >-
--health-cmd "su - ${DB2INSTANCE} -c \"db2 -t CONNECT TO ${DBNAME};\""
--health-interval 30s
--health-timeout 10s
--health-retries 5
--privileged
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Db2 CLI driver
working-directory: /tmp
run: |
wget https://github.com/ibmdb/db2drivers/raw/refs/heads/main/clidriver/v11.5.9/linuxx64_odbc_cli.tar.gz
tar xf linuxx64_odbc_cli.tar.gz
rm linuxx64_odbc_cli.tar.gz
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: ibm_db2
coverage: pcov
ini-values: zend.assertions=1
env:
fail-fast: true
IBM_DB2_CONFIGURE_OPTS: '--with-IBM_DB2=/tmp/clidriver'
- name: Install dependencies with Composer
uses: ramsey/composer-install@v3
with:
composer-options: '--ignore-platform-req=php+'
- name: Create temporary tablespace
run: docker exec "${{ job.services.db2.id }}" su - db2inst1 -c "db2 -t CONNECT TO doctrine; db2 -t CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K"
- name: Run PHPUnit
run: vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml
- name: Upload coverage file
uses: actions/upload-artifact@v5
with:
name: ${{ github.job }}-php-${{ inputs.php-version }}.coverage
path: coverage.xml