aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorzsloan2020-10-19 13:43:32 -0500
committerGitHub2020-10-19 13:43:32 -0500
commit8eaae7296e2d66726975ddba0de8aecae256e63b (patch)
tree5505b932195a454c1ada10677f0e76faba6b588f /.github/workflows
parent5fdb3b83566516782542d04b92a5be97f41c2330 (diff)
parent3f242af74af814d9344e1e80c5f94914c6d9b621 (diff)
downloadgenenetwork2-8eaae7296e2d66726975ddba0de8aecae256e63b.tar.gz
Merge branch 'testing' into scroller_testing
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/main.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..2fd9a886
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,48 @@
+name: tests
+
+# Run actions when pushing to the testing branch or when you create a
+# PR against it
+on:
+ push:
+ branches: [ testing ]
+ pull_request:
+ branches: [ testing ]
+
+jobs:
+ unittest:
+ runs-on: ubuntu-latest
+ container: bonfacekilz/python2-genenetwork2:latest
+
+ 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
+
+ # Redis is required by some of the tests 6379
+ - name: Start Redis
+ run: |
+ /gn2-profile/bin/screen -dmLS redisconn /gn2-profile/bin/redis-server
+
+ # Redis is required by some of the tests 6379
+ - 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: Run the unit tests
+ run: |
+ env GN2_PROFILE=/gn2-profile \
+ TMPDIR=/tmp SERVER_PORT=5004 \
+ WEBSERVER_MODE=DEBUG LOG_LEVEL=DEBUG \
+ GENENETWORK_FILES=/genotype_files/ bin/genenetwork2 \
+ etc/default_settings.py -c -m unittest discover -v