Fix database migration step, only setup MySQL on Linux

This commit is contained in:
jvyden 2021-10-16 21:25:46 -04:00
commit 87a294d254
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -37,9 +37,11 @@ jobs:
run: dotnet build -c Debug
- name: Make sure the default MySQL service is stopped
if: ${{ matrix.os.prettyName == 'Linux' }}
run: sudo service mysql stop
- name: Set up MySQL
if: ${{ matrix.os.prettyName == 'Linux' }}
uses: mirromutth/mysql-action@v1.1
with:
mysql database: 'lighthouse'
@ -47,7 +49,8 @@ jobs:
mysql password: 'lighthouse'
- name: Run database migrations
run: mysql -u lighthouse -p lighthouse lighthouse < DatabaseMigrations/*.sql
if: ${{ matrix.os.prettyName == 'Linux' }}
run: cat DatabaseMigrations/*.sql | mysql -u lighthouse -p lighthouse lighthouse
- name: Test
continue-on-error: true