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/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: # 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 - name: Start Genenetwork as a Background Task run: | /gn2-profile/bin/screen -dmLS gn2conn bash -c "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" - 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 - name: Test for Broken Links run: | env GN2_PROFILE=/gn2-profile \ TMPDIR=/tmp\ WEBSERVER_MODE=DEBUG LOG_LEVEL=DEBUG \ GENENETWORK_FILES=/genotype_files/ bin/genenetwork2 \ etc/default_settings.py -c \ $PWD/test/requests/links_scraper/genelinks.py