Skip to content

Commit e24cbd2

Browse files
Refactor Github Action per b/485167538 (#14468)
Co-authored-by: Ben Knutson <benknutson@google.com>
1 parent 66dfcea commit e24cbd2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/tests-unit-php.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,21 @@ jobs:
150150

151151
- name: Verify MariaDB connection
152152
run: |
153-
while ! mysqladmin ping -h"127.0.0.1" -P"${{ job.services.mysql.ports[3306] }}" --silent; do
153+
while ! mysqladmin ping -h"127.0.0.1" -P"${JOB_SERVICES_MYSQL_3307TH_PORTS}" --silent; do
154154
sleep 1
155155
done
156+
env:
157+
JOB_SERVICES_MYSQL_3307TH_PORTS: ${{ job.services.mysql.ports[3306] }}
156158

157159
- name: Install svn
158160
run: |
159161
sudo apt update -y --allow-releaseinfo-change
160162
sudo apt install -y subversion
161163
162164
- name: Set up tests
163-
run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1:${{ job.services.mysql.ports['3306'] }} ${{ matrix.wp }} true
165+
run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1:${JOB_SERVICES_MYSQL_PORTS_3306} ${{ matrix.wp }} true
166+
env:
167+
JOB_SERVICES_MYSQL_PORTS_3306: ${{ job.services.mysql.ports['3306'] }}
164168

165169
- name: Set up problem matchers for PHPUnit
166170
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

0 commit comments

Comments
 (0)