Add new MariaDB sandbox mode into test data #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
permissions: | |
contents: read | |
on: [push] | |
jobs: | |
test-sh: | |
name: Test files and run coverage | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: testbench | |
ports: | |
- "3306:3306" | |
options: --name mysql-server --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: prepare mysql server | |
env: | |
TEST_MYSQL_HOST: "127.0.0.1" | |
TEST_MYSQL_USER: root | |
TEST_MYSQL_PASS: testbench | |
TEST_MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} | |
run: mysql --host ${TEST_MYSQL_HOST} -u${TEST_MYSQL_USER} -p${TEST_MYSQL_PASS} --port ${TEST_MYSQL_PORT} -e "use mysql; delete from user where User != 'root' OR host != '%'; update user set authentication_string=PASSWORD('testbench'), host='%', password_last_changed=FROM_UNIXTIME(1523829600) where User='root'; update user set plugin='mysql_native_password'; delete from user where User = 'sys'; FLUSH PRIVILEGES;" | |
- name: run my tests | |
uses: sudo-bot/action-shunit2@latest | |
with: | |
cli: "./run-tests.sh" | |
env: | |
TEST_MYSQL_HOST: "mysql-server" | |
TEST_MYSQL_USER: root | |
TEST_MYSQL_PASS: testbench | |
TEST_MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} | |
- name: Send coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage/cov.xml |