Merge pull request #66 from TheYardVFX/feature/mysql-index-perf #48
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: Tests Ubuntu | |
# Run this workflow every time a new commit pushed to your repository | |
on: [push, pull_request] | |
jobs: | |
# Set the job key. The key is displayed as the job name | |
# when a job name is not provided | |
test: | |
# Name the Job | |
name: Tests Ubuntu | |
# Set the type of machine to run on | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
steps: | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '2.x' | |
- name: Install Python modules | |
run: pip install twisted mysqlclient | |
- name: Test SQLite | |
run: python tests/main_test.py | |
- name: Verify MySQL connection from host | |
run: mysql --host 127.0.0.1 --port 3306 -uroot -proot -e "CREATE DATABASE base" | |
- name: Test MySQL | |
run: | | |
echo "[server]" > coalition.ini | |
echo "db_type=mysql" >> coalition.ini | |
echo "db_mysql_host=127.0.0.1" >> coalition.ini | |
echo "db_mysql_user=root" >> coalition.ini | |
echo "db_mysql_password=root" >> coalition.ini | |
echo "db_mysql_base=base" >> coalition.ini | |
python tests/main_test.py |