@@ -93,32 +93,65 @@ jobs:
9393 run : composer test -- --compact
9494
9595 install :
96- name : Install on ${{ matrix.db }} (PHP ${{ matrix.php }})
96+ name : Install on ${{ matrix.db }}
9797 runs-on : ubuntu-latest
9898 strategy :
9999 fail-fast : false
100100 matrix :
101101 # The two database servers the CLI installer supports besides sqlite,
102102 # each on its current long term release. The sqlite path is covered by
103103 # the build workflow, which installs on it to produce the nightly zip.
104- db : [mysql, pgsql]
105- php : ['8.3', '8.4']
104+ # One PHP version only: what this job proves is the installer's MySQL
105+ # and PostgreSQL paths, and those do not vary with the PHP minor. The
106+ # matrix above already runs the analysis and the tests on both.
107+ include :
108+ - db : mysql
109+ user : root
110+ password : secret
111+ - db : pgsql
112+ user : evo
113+ password : secret
106114 env :
107115 COMPOSE : .github/docker/ci/docker-compose.yml
108- PHP_VERSION : ${{ matrix.php }}
109116 steps :
110117 - uses : actions/checkout@v7
111118
112- # Everything happens inside the containers: a PHP image with pdo_mysql and
113- # pdo_pgsql, next to the database server. See .github/docker/ci/ for what
114- # the run asserts - it fails on any PHP diagnostic, on missing or wrong
115- # seeded data, and on a site that does not answer.
119+ # Only the database server runs in a container, straight from its official
120+ # image - nothing is built here. The installer itself runs on the runner's
121+ # own PHP, which already carries the PDO drivers; building a PHP image for
122+ # it would cost minutes per leg to reproduce what setup-php hands over
123+ # prebuilt. .github/docker/ci/ still describes the full containerised run
124+ # for local use.
125+ - name : Start ${{ matrix.db }}
126+ run : docker compose -f "$COMPOSE" --profile ${{ matrix.db }} up -d --wait ${{ matrix.db }}
127+
128+ # error_log to stderr for the same reason the CI image sets it: the
129+ # installer runs the migrations inside an output buffer it later discards,
130+ # so a warning raised during one only reaches the log the script greps if
131+ # PHP also writes it outside that buffer.
132+ - name : Setup PHP
133+ uses : shivammathur/setup-php@v2
134+ with :
135+ php-version : ' 8.3'
136+ extensions : ${{ env.PHP_EXTENSIONS }}, pdo_mysql, pdo_pgsql
137+ ini-values : error_reporting=E_ALL, display_errors=On, display_startup_errors=On, log_errors=On, error_log=/dev/stderr
138+ coverage : none
139+ tools : composer:v2
140+
141+ # core/vendor is committed, so there is no composer step: the script calls
142+ # the installer with --skipComposer=y. See .github/docker/ci/ for what the
143+ # run asserts - it fails on any PHP diagnostic, on missing or wrong seeded
144+ # data, and on a site that does not answer.
116145 - name : Install and smoke test
117- run : |
118- docker compose -f "$COMPOSE" --profile ${{ matrix.db }} up \
119- --build \
120- --abort-on-container-exit \
121- --exit-code-from install-${{ matrix.db }}
146+ env :
147+ EVO_APP_DIR : ${{ github.workspace }}
148+ EVO_DB_TYPE : ${{ matrix.db }}
149+ EVO_DB_HOST : 127.0.0.1
150+ EVO_DB_USER : ${{ matrix.user }}
151+ EVO_DB_PASSWORD : ${{ matrix.password }}
152+ EVO_DB_NAME : evolution
153+ EVO_DB_PREFIX : evo_
154+ run : .github/docker/ci/install-and-smoke.sh
122155
123156 - name : Database server log
124157 if : failure()
0 commit comments