Skip to content

Commit

Permalink
Remove password when connecting to mysql on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-kotliar committed Jul 8, 2020
1 parent 6a8265f commit b7a3a81
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,20 @@ jobs:
- name: SciDAP workflow tests
before_install:
- git clone https://github.com/datirium/workflows.git --recursive
# - docker pull mysql/mysql-server:5.7
# - docker run -v ~/database:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=airflow -e MYSQL_DATABASE=airflow -e MYSQL_USER=airflow -e MYSQL_PASSWORD=airflow -p 6603:3306 -d mysql/mysql-server:5.7 --explicit-defaults-for-timestamp=1
install:
- pip install mysqlclient
- pip install .
- pip install mysqlclient
before_script:
- airflow --help # to generate airflow.cfg
- cat ~travis/.my.cnf # to see what it the socket for mysql
- sed -i'.backup' -e 's/^executor.*/executor = LocalExecutor/g' ~/airflow/airflow.cfg
- sed -i'.backup' -e 's/^dag_dir_list_interval =.*/dag_dir_list_interval = 60/g' ~/airflow/airflow.cfg
- sed -i'.backup' -e 's/^parallelism =.*/parallelism = 1/g' ~/airflow/airflow.cfg
# - sed -i'.backup' -e 's/^sql_alchemy_conn.*/sql_alchemy_conn = mysql:\/\/airflow:airflow@127.0.0.1:6603\/airflow/g' ~/airflow/airflow.cfg
- sed -i'.backup' -e 's/^sql_alchemy_conn.*/sql_alchemy_conn = mysql:\/\/root:@127.0.0.1:3306\/airflow/g' ~/airflow/airflow.cfg
- sed -i'.backup' -e 's/^sql_alchemy_conn.*/sql_alchemy_conn = mysql:\/\/root@127.0.0.1:3306\/airflow/g' ~/airflow/airflow.cfg
- cat ~/airflow/airflow.cfg # to check if airflow.cfg was updated
- cwl-airflow init # to init database and add process_report connection
- airflow connections -l # to check if connection was added
- airflow checkdb # to check if we can connect to database
- cwl-airflow init # to init database and add process_report connection
- airflow connections -l # to check if connection was added
- airflow checkdb # to check if we can connect to database
- airflow scheduler > /dev/null 2>&1 &
- cwl-airflow api > /dev/null 2>&1 &
script: cwl-airflow test --suite workflows/tests/conformance_tests.yaml --spin --range 1
Expand Down

0 comments on commit b7a3a81

Please sign in to comment.