From 957a465d8a91f9100fc23f285d6f01bc6b087323 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 22 Sep 2020 03:19:29 +0300 Subject: Update bug_report template * .github/ISSUE_TEMPLATE/bug_report.md: Update environment setup section --- .github/ISSUE_TEMPLATE/bug_report.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 789d6a57..7d7e34a5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,7 +26,8 @@ If applicable, add screenshots to help explain your problem. **Environment setup (please complete the following information):** - OS: [e.g. Linux] -- Racket Version [e.g. v7.6] +- Guix Version (optional) +- [Anything else you think is relevant] **Additional context** -- cgit v1.2.3 From f184e2b4762d1ec5608d600dcb87406679212e39 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 22 Sep 2020 04:27:43 +0300 Subject: Add unittesting github action * .github/workflows/main.yml: Add it. --- .github/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/main.yml (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..4c8db1c4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +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: + # Use v1 of checkout since v2 fails + - name: Checkout Project + uses: actions/checkout@v1 + + # Redis is required by some of the tests + - name: Start Redis + run: | + redis-server --daemonize yes + + - name: Run the unit tests + run: | + mkdir -p /genotype_files/genotype/json + env GN2_PROFILE=/usr/gn2-profile TMPDIR=/tmp SERVER_PORT=5004 \ + GENENETWORK_FILES=/genotype_files/ bash bin/genenetwork2 \ + etc/default_settings.py -c -m unittest discover -v -- cgit v1.2.3 From 855558084a538ebdfec0bd43f829ba8d0d314a21 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 23 Sep 2020 03:05:42 +0300 Subject: Update github action to include mariadb service * .github/workflows/main.yml: Add mariadb service. This makes the build pass because somewhere(because of cyclic imports), a connection to mariadb is required. --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c8db1c4..94b0db75 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,19 @@ jobs: runs-on: ubuntu-latest container: bonfacekilz/python2-genenetwork2:latest + services: + mariadb: + image: mariadb:latest + ports: + - 3306:3306 + env: + MYSQL_USER: gn2 + MYSQL_PASSWORD: mysql_password + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: db_webqtl_s + MYSQL_ROOT_PASSWORD: mysql_password + options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 + steps: # Use v1 of checkout since v2 fails - name: Checkout Project -- cgit v1.2.3 From 1907457a00f0f7a9f7e74d8955265c8635f03bce Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 25 Sep 2020 03:55:33 +0300 Subject: Update github action * .github/workflows/main.yml: Set up a mariadb and redis within the GH action. (services): Remove mariadb service. --- .github/workflows/main.yml | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94b0db75..2fd9a886 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,32 +13,36 @@ jobs: runs-on: ubuntu-latest container: bonfacekilz/python2-genenetwork2:latest - services: - mariadb: - image: mariadb:latest - ports: - - 3306:3306 - env: - MYSQL_USER: gn2 - MYSQL_PASSWORD: mysql_password - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: db_webqtl_s - MYSQL_ROOT_PASSWORD: mysql_password - options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --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 - # Redis is required by some of the tests + # Redis is required by some of the tests 6379 - name: Start Redis run: | - redis-server --daemonize yes + /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: | - mkdir -p /genotype_files/genotype/json - env GN2_PROFILE=/usr/gn2-profile TMPDIR=/tmp SERVER_PORT=5004 \ - GENENETWORK_FILES=/genotype_files/ bash bin/genenetwork2 \ + 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 -- cgit v1.2.3