diff .github/workflows/ci-test.yml @ 6861:097578791f7b

mysql verbose and remove -u
author John Rouillard <rouilj@ieee.org>
date Wed, 31 Aug 2022 23:19:49 -0400
parents 69928bcce59d
children 7d34cdb6c116
line wrap: on
line diff
--- a/.github/workflows/ci-test.yml	Wed Aug 31 23:16:26 2022 -0400
+++ b/.github/workflows/ci-test.yml	Wed Aug 31 23:19:49 2022 -0400
@@ -44,7 +44,7 @@
 
       # Display the Python version being used
       - name: Display Python version
-        run: python -c "import sys; print(sys.version)"; echo $PYTHON_VERSION
+        run: python -c "import sys; print(sys.version)"
 
       # Install the databases
       - name: Install postgres
@@ -58,12 +58,13 @@
 
       - name: Install mysql/mariadb
         run: |
+          sh -xv
           sudo apt-get install mysql-server mysql-client
           # set up mysql database
           sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/my.cnf
           cat /etc/mysql/my.cnf
           sudo service mysql restart
-          sudo mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";'
+          sudo mysql -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";'
 
       - name: Update pip
         run: python -m pip install --upgrade pip
@@ -83,7 +84,7 @@
         run: |
           set -xv
           pip install zstd || true
-          if [[ $(python -c 'import sys; print("%d.%d.%d"%(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))') != "2."* ]]; then 
+          if [[ "$PYTHON_VERSION" != "2."* ]]; then 
               pip install Markdown; fi
 
       - name: Install pytest and other packages needed for running tests
@@ -107,7 +108,7 @@
       # Run the tests using pytest with test files in tests directory.
       - name: Run tests
         run: |
-          if [[ $(python -c 'import sys; print("%d.%d.%d"%(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))') != "2."* ]]; then 
+          if [[ "$PYTHON_VERSION" != "2."* ]]; then 
             pytest -r a \
               -W default \
               -W "ignore:SelectableGroups:DeprecationWarning" \

Roundup Issue Tracker: http://roundup-tracker.org/