Skip to content

Commit

Permalink
tests(server): force db reset (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhulce authored Aug 4, 2020
1 parent 0474934 commit fe942e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
postgressocket:
image: postgres:12
volumes:
- /mnt:/var/run/postgresql
- /mnt/psql:/var/run/postgresql
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -81,13 +81,13 @@ jobs:
echo "::set-env name=CHROME_PATH::$(which google-chrome-stable)"
echo "::set-env name=POSTGRES_DB_URL::postgres://postgres:postgres@localhost/lighthouse_ci_test"
echo "::set-env name=MYSQL_DB_URL::mysql://root:[email protected]:33306/lighthouse_ci_test"
echo "::set-env name=POSTGRES_SOCKET_PATH::/mnt/.s.PGSQL.5432"
echo "::set-env name=POSTGRES_SOCKET_PATH::/mnt/psql/.s.PGSQL.5432"
export PGPASSWORD="postgres"
export MYSQL_PWD="mysql"
psql -h localhost -p 5432 -c 'create database lighthouse_ci_test;' -U postgres
mysql --host=127.0.0.1 --port=33306 -e 'create database lighthouse_ci_test;' -u root
psql --host /mnt -c 'create database lighthouse_ci_test;' -U postgres
psql --host /mnt/psql -c 'create database lighthouse_ci_test;' -U postgres
google-chrome-stable --version
- run: yarn
Expand Down
1 change: 1 addition & 0 deletions packages/server/test/mysql-socket-path-server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('mysql server (socket path)', () => {
storage: {
storageMethod: 'sql',
sqlDialect: 'mysql',
sqlDangerouslyResetDatabase: true,
sqlDialectOptions: {
socketPath: process.env.MYSQL_SOCKET_PATH,
},
Expand Down
1 change: 1 addition & 0 deletions packages/server/test/postgres-socket-path-server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('postgres server', () => {
storage: {
storageMethod: 'sql',
sqlDialect: 'postgres',
sqlDangerouslyResetDatabase: true,
sqlDialectOptions: {
socketPath: process.env.POSTGRES_SOCKET_PATH,
},
Expand Down

0 comments on commit fe942e3

Please sign in to comment.