Check if test goes green. #12
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: mysql-semver test workflow | |
on: [push] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: tests | |
env: | |
DB_DATABASE: test_db | |
DB_USER: root | |
DB_PASSWORD: root | |
DB_HOST: localhost | |
steps: | |
- name: Set up MySQL server | |
run: | | |
sudo systemctl start mysql | |
mysql -uroot -proot -e "SELECT version();" | |
mysql -uroot -proot -e "CREATE DATABASE test_db DEFAULT CHARACTER SET utf8mb4;" | |
mysql -uroot -proot -e "SHOW DATABASES;" | |
- uses: actions/checkout@v3 | |
- name: Set up stored functions | |
run: mysql -uroot -proot test_db < ./semver.sql | |
- name: Run tests | |
run: if mysql -uroot -proot test_db < ./tests.sql | egrep '.'; then exit 1; fi | |