aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
authorBonfaceKilz2021-05-11 13:38:47 +0300
committerBonfaceKilz2021-05-11 15:15:54 +0300
commitc4ec08c1b544c05cce1c1247b8bc1afb741643e4 (patch)
tree2dcfd1eb153ddcce32d291791817ec4fb20a7492 /.github/workflows/main.yml
parent75b378f757979af1d6fdaff3f3abde0599c5f744 (diff)
downloadgenenetwork2-c4ec08c1b544c05cce1c1247b8bc1afb741643e4.tar.gz
workflows: main.yml: Remove mysql service and update gn2 b/g task
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r--.github/workflows/main.yml31
1 files changed, 17 insertions, 14 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index a2925e08..c6b56a81 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -12,19 +12,16 @@ jobs:
unittest:
runs-on: ubuntu-latest
container: bonfacekilz/python3-genenetwork2:00ba1f8
- services:
- mysql:
- image: mariadb:15.1
- env:
- MYSQL_ALLOW_EMPTY_PASSWORD: yes
- MYSQL_USER: gn2
- MYSQL_PASSWORD: mysql_password
- MYSQL_DATABASE: db_webqtl_s
- ports:
- - 3306:3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
+ # First start with mariadb set then checkout. The checkout gives
+ # the mysqld enough time to start
+ - name: Set up mariadb
+ run: |
+ mysql_install_db --user=mysql --datadir=/usr/local/mysql
+ # Wait for the mysqld_safe process to start
+ mysqld_safe --user=mysql --datadir=/usr/local/mysql &
+
# Use v1 of checkout since v2 fails
- name: Checkout Project
uses: actions/checkout@v1
@@ -34,10 +31,17 @@ jobs:
run: |
/gn2-profile/bin/screen -dmLS redisconn /gn2-profile/bin/redis-server
+ # Initialise the tables
+ - name: Bootstrap tables
+ run: |
+ mysql -u root -e "SHOW DATABASES;"
+ mysql -u root -e "CREATE DATABASE db_webqtl_s;"
+ mysql -u root -e "CREATE USER 'gn2'@'localhost' IDENTIFIED BY 'mysql_password';"
+ mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'gn2'@'localhost';FLUSH PRIVILEGES;"
+
- name: Start Genenetwork as a Background Task
run: |
- /gn2-profile/bin/screen -dmLS gn2conn
- bash -c "env GN2_PROFILE=/gn2-profile \
+ /gn2-profile/bin/screen -dm bash -c "env GN2_PROFILE=/gn2-profile \
TMPDIR=/tmp SERVER_PORT=5004 \
WEBSERVER_MODE=DEBUG LOG_LEVEL=DEBUG \
GENENETWORK_FILES=/genotype_files/ bin/genenetwork2 \
@@ -59,4 +63,3 @@ jobs:
GENENETWORK_FILES=/genotype_files/ bin/genenetwork2 \
etc/default_settings.py -c \
$PWD/test/requests/links_scraper/genelinks.py
-