Skip to content

Commit

Permalink
fix mysql user
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhegarty committed Dec 26, 2021
1 parent 522f993 commit 76fe540
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/django-import-export-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
USERNAME: testuser
PASSWD: somepass
DB_NAME: import_export
MYSQL_USER: root
MYSQL_PASS: root
strategy:
max-parallel: 4
matrix:
Expand Down Expand Up @@ -59,12 +61,12 @@ jobs:
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_NAME }};' -uroot -proot
mysql -e 'CREATE DATABASE ${{ env.DB_NAME }};' -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASS }}
- name: Verify MySQL connection from host
run: |
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
pip install mysqlclient
mysql --host 127.0.0.1 --port 3306 -uroot -proot -e "SHOW DATABASES"
mysql --host 127.0.0.1 --port 3306 -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASS }} -e "SHOW DATABASES"
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -99,8 +101,8 @@ jobs:
IMPORT_EXPORT_TEST_TYPE: ${{ matrix.test_type }}
IMPORT_EXPORT_POSTGRESQL_USER: postgres
IMPORT_EXPORT_POSTGRESQL_PASSWORD: ${{ env.PASSWD }}
IMPORT_EXPORT_MYSQL_USER: ${{ env.USERNAME }}
IMPORT_EXPORT_MYSQL_PASSWORD: ${{ env.PASSWD }}
IMPORT_EXPORT_MYSQL_USER: ${{ env.MYSQL_USER }}
IMPORT_EXPORT_MYSQL_PASSWORD: ${{ env.MYSQL_PASS }}
run: >
PYTHONPATH=".:tests:$PYTHONPATH" python -W error::DeprecationWarning -W error::PendingDeprecationWarning
-m coverage run tests/manage.py test core --settings=
Expand Down

0 comments on commit 76fe540

Please sign in to comment.