9696 # The matrix check is necessary because an empty job matrix is otherwise considered a workflow failure
9797 if : ${{ !contains(needs.setup.outputs.commit_message, '[ci skip]') && contains(needs.setup.outputs.verify_matrix, 'TESTLANG') }}
9898 runs-on : ubuntu-22.04
99+ services :
100+ mysql :
101+ image : mysql/mysql-server:8.0.32
102+ env :
103+ MYSQL_ROOT_PASSWORD : robot_123456#
104+ MYSQL_DATABASE : hello_world
105+ MYSQL_ROOT_HOST : " %"
106+ ports :
107+ - 3306:3306
108+ options : >-
109+ --health-cmd="mysqladmin ping"
110+ --health-interval=10s
111+ --health-timeout=5s
112+ --health-retries=3
99113 strategy :
100114 matrix : ${{ fromJSON(needs.setup.outputs.verify_matrix) }}
101115 # Disable fail-fast to allow all failing frameworks/etc to fail in a
@@ -109,6 +123,9 @@ jobs:
109123 TARGET_BRANCH_NAME : ${{ needs.setup.outputs.target_branch_name }}
110124 PREVIOUS_COMMIT : ${{ needs.setup.outputs.previous_commit }}
111125 PR_NUMBER : ${{ github.event.pull_request.number }}
126+ JDBC_URL : " jdbc:mysql://localhost/hello_world"
127+ JDBC_USER : " root"
128+ JDBC_PSWD : " robot_123456#"
112129 steps :
113130 - uses : actions/checkout@v3
114131 with :
@@ -117,6 +134,9 @@ jobs:
117134 with :
118135 python-version : ' 3.10'
119136 architecture : ' x64'
137+ - name : Import SQL Script
138+ run : |
139+ cat FrameworkBenchmarks/frameworks/Java/tio-server/sql/hello_world.sql | mysql -h localhost -u root -probot_123456# hello_world
120140 - name : Get all changes vs master
121141 # Runs github_actions_diff, with the the output accessible in later steps
122142 run : |
@@ -135,7 +155,7 @@ jobs:
135155 echo "RUN_TESTS<<EOF" >> $GITHUB_ENV
136156 echo "$(grep -oP "github-actions-run-tests \K(.*)" <<< $DIFF || true)" >> $GITHUB_ENV
137157 echo "EOF" >> $GITHUB_ENV
138- - name : Log status
158+ - name : Log statusservices
139159 run : |
140160 if [ "$RUN_TESTS" ]; then echo "Proceeding to run tests."; else echo 'Skipping test verification.'; fi
141161 - name : Build tfb dockerfile
@@ -155,7 +175,16 @@ jobs:
155175 # run-ci.py runs the diffing to see if github actions needs to test this framework. Ideally/eventually,
156176 # we'd like to try and do the diffing before github_actions_clean & setup.
157177 # This will run the tests exactly as you would in your own vm:
158- docker network create tfb > /dev/null 2>&1 && docker run --network=tfb -e USER_ID=$(id -u) -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks techempower/tfb --mode verify --test-dir $RUN_TESTS --results-environment Github-Actions;
178+ docker network create tfb > /dev/null 2>&1 \
179+ && docker run --network=tfb -e USER_ID=$(id -u) \
180+ -v /var/run/docker.sock:/var/run/docker.sock \
181+ -e JDBC_URL="jdbc:mysql://localhost/hello_world" \
182+ -e JDBC_USER="root" \
183+ -e JDBC_PSWD="robot_123456#" \
184+ --mount type=bind,source=`pwd`,target=/FrameworkBenchmarks \
185+ techempower/tfb \
186+ --mode verify --test-dir $RUN_TESTS \
187+ --results-environment Github-Actions;
159188 dependabot :
160189 needs : verify
161190 runs-on : ubuntu-latest
0 commit comments