Skip to content

Commit

Permalink
Merge pull request #14878 from strapi/fix/github-test-mysql5
Browse files Browse the repository at this point in the history
Add MySQL 5.7 to Github API tests
  • Loading branch information
petersg83 committed Nov 29, 2022
2 parents 1ffef66 + 5d9faf3 commit f6af89b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contributor-doc.yml
Expand Up @@ -21,7 +21,7 @@ permissions: {}
jobs:
deploy:
permissions:
contents: write # to push pages branch (peaceiris/actions-gh-pages)
contents: write # to push pages branch (peaceiris/actions-gh-pages)

environment:
name: github-pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)
contents: read # to fetch code (actions/checkout)

jobs:
publish:
Expand Down
43 changes: 21 additions & 22 deletions .github/workflows/tests.yml
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)
contents: read # to fetch code (actions/checkout)

jobs:
lint:
Expand Down Expand Up @@ -142,18 +142,18 @@ jobs:
node: [14, 16, 18]
services:
mysql:
image: mysql
image: bitnami/mysql:latest
env:
MYSQL_ROOT_PASSWORD: strapi
MYSQL_USER: strapi
MYSQL_PASSWORD: strapi
MYSQL_DATABASE: strapi_test
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
-e MYSQL_ROOT_PASSWORD=strapi
-e MYSQL_ROOT_HOST="%"
-e MYSQL_USER=strapi
-e MYSQL_PASSWORD=strapi
-e MYSQL_DATABASE=strapi_test
--entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
ports:
# Maps tcp port 5432 on service container to the host
- 3306:3306
Expand All @@ -180,18 +180,17 @@ jobs:
node: [14, 16, 18]
services:
mysql:
image: mysql:5
image: bitnami/mysql:5.7
env:
MYSQL_ROOT_PASSWORD: strapi
MYSQL_USER: strapi
MYSQL_PASSWORD: strapi
MYSQL_DATABASE: strapi_test
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
-e MYSQL_ROOT_PASSWORD=strapi
-e MYSQL_ROOT_HOST="%"
-e MYSQL_USER=strapi
-e MYSQL_PASSWORD=strapi
-e MYSQL_DATABASE=strapi_test
--entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
ports:
# Maps tcp port 5432 on service container to the host
- 3306:3306
Expand Down Expand Up @@ -288,18 +287,18 @@ jobs:
node: [14, 16, 18]
services:
mysql:
image: mysql
image: bitnami/mysql:latest
env:
MYSQL_ROOT_PASSWORD: strapi
MYSQL_USER: strapi
MYSQL_PASSWORD: strapi
MYSQL_DATABASE: strapi_test
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
-e MYSQL_ROOT_PASSWORD=strapi
-e MYSQL_ROOT_HOST="%"
-e MYSQL_USER=strapi
-e MYSQL_PASSWORD=strapi
-e MYSQL_DATABASE=strapi_test
--entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
ports:
# Maps tcp port 5432 on service container to the host
- 3306:3306
Expand Down
Expand Up @@ -436,7 +436,7 @@ describe('Admin API Token v2 CRUD (api)', () => {
expect(res.body.data).toMatchObject({
accessKey: expect.any(String),
name: body.name,
permissions: body.permissions,
permissions: expect.arrayContaining(body.permissions),
description: body.description,
type: body.type,
id: expect.any(Number),
Expand Down
Expand Up @@ -115,7 +115,6 @@ describe('Uploads folder (GraphQL)', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -170,7 +169,6 @@ describe('Uploads folder (GraphQL)', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -255,7 +253,6 @@ describe('Uploads folder (GraphQL)', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -310,7 +307,6 @@ describe('Uploads folder (GraphQL)', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down
Expand Up @@ -118,7 +118,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -163,7 +162,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -230,7 +228,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -276,7 +273,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -360,7 +356,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -408,7 +403,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);

uploadFolder = file.folder;
});
Expand Down Expand Up @@ -563,7 +557,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);
});

expect(files.every((file) => file.folder.id === files[0].folder.id)).toBe(true);
Expand Down Expand Up @@ -625,7 +618,6 @@ describe('Uploads folder', () => {
},
folderPath: `/${file.folder.pathId}`,
});
expect(file.folder.id).not.toBe(uploadFolder.id);
});

expect(files.every((file) => file.folder.id === files[0].folder.id)).toBe(true);
Expand Down

0 comments on commit f6af89b

Please sign in to comment.