-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from phac-nml/development
Release 2.1.0
- Loading branch information
Showing
27 changed files
with
1,247 additions
and
770 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
pull_request: # Run on all pull requests | ||
push: | ||
branches: # Run on any push to development or main | ||
- development | ||
- main | ||
schedule: # Run weekly on development and main | ||
- cron: 0 2 * * 1 | ||
branches: development | ||
- cron: 0 2 * * 1 | ||
branches: main | ||
|
||
|
||
jobs: | ||
build-unittests: | ||
runs-on: ubuntu-20.04 #See pre-installed software at https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md | ||
strategy: | ||
fail-fast: False #Setting so that if one of the test suites fail, the other will continue | ||
matrix: | ||
python-version: [ 3.6 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 #Checkout the project from git | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run Unit Tests | ||
run: make unittests | ||
|
||
build-irida-integration: | ||
runs-on: ubuntu-20.04 #See pre-installed software at https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md | ||
env: | ||
MYSQL_PORT: 3306 | ||
MYSQL_USER: test | ||
MYSQL_PASSWORD: test | ||
MYSQL_DATABASE: irida_importer_test | ||
MYSQL_HOST: 127.0.0.1 | ||
MYSQL_ROOT_PASSWORD: password | ||
NODE_OPTIONS: "--max-old-space-size=4096" | ||
CONDA_PREFIX: /usr/share/miniconda | ||
|
||
strategy: | ||
fail-fast: False #Setting so that if one of the test suites fail, the other will continue | ||
matrix: | ||
branch: ['main','development'] # IRIDA Branches to test against | ||
|
||
steps: | ||
- uses: actions/checkout@v2 #Checkout the project from git | ||
- name: Setup MySQL | ||
uses: mirromutth/mysql-action@v1.1 | ||
with: | ||
host port: ${{ env.MYSQL_PORT }} | ||
character set server: 'utf8' | ||
collation server: 'utf8_general_ci' | ||
mysql version: '5.7' | ||
mysql database: ${{ env.MYSQL_DATABASE }} | ||
mysql user: ${{ env.MYSQL_USER }} | ||
mysql password: ${{ env.MYSQL_PASSWORD }} | ||
mysql root password: ${{ env.MYSQL_ROOT_PASSWORD }} #The root superuser password | ||
- name: Verify MySQL connection | ||
timeout-minutes: 10 | ||
run: | | ||
while ! mysqladmin ping -h"${{ env.MYSQL_HOST }}" -P"${{ env.MYSQL_PORT }}" --silent; do | ||
sleep 1 | ||
done | ||
- name: Set up JDK 11 # Installs java 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: MySQL Setup (SUDO) # Sets ONLY_FULL_GROUP_BY flag and gives runner privileges over database | ||
run: | | ||
sudo mysql -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" -h ${{ env.MYSQL_HOST }} -P ${{ env.MYSQL_PORT }} -p${{ env.MYSQL_ROOT_PASSWORD }}; | ||
sudo mysql -e "CREATE USER '${{ env.MYSQL_USER }}'@'%' IDENTIFIED BY '${{ env.MYSQL_PASSWORD }}'; GRANT ALL ON ${{ env.MYSQL_DATABASE }}.* to '${{ env.MYSQL_USER }}'@'%';" -h ${{ env.MYSQL_HOST }} -P ${{ env.MYSQL_PORT }} -p${{ env.MYSQL_ROOT_PASSWORD }}; | ||
- name: Set up PostgreSQL | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install postgresql libpq-dev | ||
sudo service postgresql start | ||
sudo -u postgres createuser --superuser "$USER" | ||
createdb runner | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.6.7 | ||
activate-environment: __irida_importer_py3.6.7 | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Install conda packages | ||
shell: bash -l {0} | ||
run: | | ||
conda config --add channels defaults | ||
conda config --add channels conda-forge | ||
conda config --add channels bioconda | ||
conda config --add channels iuc | ||
conda install bioblend=0.13.0 oauthlib=3.0.1 requests=2.22.0 requests-oauthlib=1.2.0 simplejson=3.8.1 | ||
- name: Setup galaxy conda env | ||
shell: bash -l {0} | ||
run: conda create --name _galaxy_ python=3.7.6 | ||
- name: Run Integration Tests ${{ matrix.branch }} | ||
timeout-minutes: 60 | ||
run: make integrationtests branch=${{ matrix.branch }} db_host=${{ env.MYSQL_HOST }} db_port=${{ env.MYSQL_PORT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ env | |
/.venv | ||
miniconda* | ||
.vscode | ||
.virtualenv | ||
irida_import.egg-info | ||
irida_import/tests/integration/tmp |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
SHELL=/bin/bash | ||
IRIDA_VERSION?=main | ||
|
||
requirements: clean env | ||
source .virtualenv/bin/activate | ||
python3 -m pip install -e . | ||
|
||
clean: | ||
rm -rf irida_import/.pytest_cache | ||
rm -rf .virtualenv | ||
rm -rf irida_import.egg-info/ | ||
find -name "*pyc" -delete | ||
rm -rf /tmp/repos | ||
rm -rf irida_import/tests/integration/tmp | ||
rm -rf venv | ||
|
||
env: | ||
python3 -m venv .virtualenv | ||
source .virtualenv/bin/activate | ||
python3 --version | ||
python3 -m pip install --upgrade wheel pip | ||
|
||
unittests: clean env | ||
source .virtualenv/bin/activate | ||
pip3 install -e . | ||
pip3 install pytest | ||
pytest irida_import/tests/unit/*.py | ||
|
||
integrationtests: clean env | ||
source .virtualenv/bin/activate | ||
python3 -m pip install -e .[TEST] | ||
python3 -m pip install pytest | ||
mkdir /tmp/repos | ||
python3 irida_import/tests/integration/start_integration_tests.py $(branch) $(db_host) $(db_port) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ events {} | |
|
||
http { | ||
upstream galaxy_app { | ||
server localhost:8888; | ||
server 127.0.0.1:8888; | ||
} | ||
|
||
server { | ||
|
Oops, something went wrong.