-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(e2e-env): add a dockerized e2e-env support (#156)
Co-authored-by: Guillaume Lepoetre <[email protected]>
- Loading branch information
1 parent
2b452bc
commit 8d33724
Showing
29 changed files
with
7,398 additions
and
1,515 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<module> | ||
<name>ps_eventbus</name> | ||
<displayName><![CDATA[PrestaShop Eventbus]]></displayName> | ||
<displayName><![CDATA[PrestaShop EventBus]]></displayName> | ||
<version><![CDATA[0.0.0]]></version> | ||
<description><![CDATA[Link your PrestaShop account to synchronize your shop data to a tech partner of your choice. Do not uninstall this module if you are already using a service, as it will prevent it from working.]]></description> | ||
<author><![CDATA[PrestaShop]]></author> | ||
<tab><![CDATA[administration]]></tab> | ||
<confirmUninstall><![CDATA[This action will immediately prevent your PrestaShop services and Community services from working as they are using PrestaShop CloudSync for syncing.]]></confirmUninstall> | ||
<confirmUninstall><![CDATA[This action will immediately prevent your PrestaShop services and Community services from working as they are using PrestaShop CloudSync for syncing.]]></confirmUninstall> | ||
<is_configurable>0</is_configurable> | ||
<need_instance>0</need_instance> | ||
<limited_countries></limited_countries> | ||
</module> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
# Note: this file is here for documentation purpose | ||
# It will be overridden by the Makefile | ||
# Note: this file defaults to the E2E env, it will be overridden on zip build | ||
parameters: | ||
ps_eventbus.proxy_api_url: "https://eventbus-proxy.psessentials.net" | ||
ps_eventbus.sync_api_url: "https://eventbus-sync.psessentials.net" | ||
ps_eventbus.live_sync_api_url: "https://api.cloudsync.prestashop.com/live-sync/v1" | ||
ps_eventbus.proxy_api_url: "http://reverse-proxy/collector" | ||
ps_eventbus.sync_api_url: "http://reverse-proxy/sync-api" | ||
ps_eventbus.live_sync_api_url: "http://reverse-proxy/live-sync-api/v1" | ||
ps_eventbus.sentry_dsn: "https://[email protected]/stuff" | ||
ps_eventbus.sentry_env: "development" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Infrastructure dependencies | ||
DOCKER_IMAGE_PRESTASHOP=prestashop/prestashop-flashlight:latest | ||
DOCKER_VERSION_MARIADB=lts | ||
|
||
# Infrastructure port binding on the host | ||
HOST_PORT_BIND_PRESTASHOP=8000 | ||
HOST_PORT_BIND_MYSQL=3306 | ||
HOST_PORT_BIND_PHP_MY_ADMIN=6060 | ||
HOST_PORT_BIND_CLOUDSYNC_REVERSE_PROXY=80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
root: true | ||
env: | ||
jest: true | ||
es6: true | ||
plugins: | ||
- '@typescript-eslint' | ||
- deprecation | ||
- import | ||
- unicorn | ||
- prettier | ||
extends: | ||
- eslint:recommended | ||
- plugin:@typescript-eslint/recommended | ||
- plugin:import/recommended | ||
- plugin:import/typescript | ||
- plugin:prettier/recommended | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
sourceType: module | ||
project: true | ||
ignorePatterns: | ||
- 'dist/' | ||
- 'node_modules/' | ||
- 'coverage/' | ||
settings: | ||
import/parsers: | ||
'@typescript-eslint/parser': | ||
- '.ts' | ||
import/resolver: | ||
typescript: | ||
project: true | ||
node: | ||
project: true | ||
rules: | ||
'prettier/prettier': error | ||
'@typescript-eslint/no-explicit-any': off | ||
'@typescript-eslint/explicit-module-boundary-types': off | ||
'@typescript-eslint/no-unused-vars': | ||
- warn | ||
- argsIgnorePattern: '^_' | ||
varsIgnorePattern: '^_' | ||
unicorn/filename-case: | ||
- error | ||
- case: kebabCase | ||
deprecation/deprecation: warn | ||
import/no-unresolved: error | ||
import/no-extraneous-dependencies: | ||
- error | ||
- devDependencies: | ||
- '**/*.ts' | ||
optionalDependencies: | ||
- '**/*.ts' | ||
peerDependencies: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
singleQuote: true | ||
trailingComma: all | ||
plugins: | ||
- 'prettier-plugin-organize-imports' | ||
overrides: | ||
- files: | ||
- '**/*.js' | ||
options: | ||
singleQuote: false | ||
parser: flow | ||
trailingComma: 'es5' | ||
tabWidth: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/swcrc", | ||
"jsc": { | ||
"parser": { | ||
"syntax": "ecmascript", | ||
"jsx": false, | ||
"dynamicImport": false, | ||
"privateMethod": false, | ||
"functionBind": false, | ||
"exportDefaultFrom": false, | ||
"exportNamespaceFrom": false, | ||
"decorators": false, | ||
"decoratorsBeforeExport": false, | ||
"topLevelAwait": false, | ||
"importMeta": false | ||
}, | ||
"transform": null, | ||
"target": "es2022", | ||
"loose": false, | ||
"externalHelpers": false, | ||
// Requires v1.2.50 or upper and requires target to be es2016 or upper. | ||
"keepClassNames": false | ||
}, | ||
"minify": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:20.10-alpine | ||
|
||
ENV CI=true | ||
ENV RUN_IN_DOCKER=1 | ||
RUN npm install -g pnpm | ||
|
||
WORKDIR /home/node | ||
ADD . /home/node | ||
RUN pnpm install | ||
|
||
ENTRYPOINT [ "pnpm" ] | ||
CMD [ "test" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"moduleFileExtensions": ["js", "json", "ts"], | ||
"rootDir": "src", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.ts$": "ts-jest" | ||
}, | ||
"collectCoverageFrom": ["**/*.(t|j)s"], | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node", | ||
"moduleNameMapper": { | ||
"^@/(.*)$": "<rootDir>/$1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "cloudsync-mock", | ||
"version": "0.0.0", | ||
"type": "module", | ||
"main": "dist/app.js", | ||
"scripts": { | ||
"build": "npx swc ./src -d dist", | ||
"start:dev": "npx swc ./src -w -d dist", | ||
"start": "node dist/app.js", | ||
"lint": "eslint 'src/**/*.ts'", | ||
"lint:fix": "eslint 'src/**/*.ts' --fix", | ||
"format": "prettier --check ./src/**/*", | ||
"format:fix": "prettier --write ./src/**/*", | ||
"fix": "pnpm format:fix && pnpm lint:fix", | ||
"test": "npx jest", | ||
"docker:build": "docker compose -f ../docker-compose.yml build cloudsync-mock-test", | ||
"docker:up": "docker compose -f ../docker-compose.yml up -d --wait", | ||
"docker:down": "docker compose -f ../docker-compose.yml down" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@swc/cli": "^0.1.63", | ||
"@swc/core": "^1.3.99", | ||
"@swc/jest": "^0.2.29", | ||
"@types/express": "^4.17.21", | ||
"@types/jest": "^29.5.10", | ||
"@types/node": "^20.10.0", | ||
"@types/supertest": "^2.0.16", | ||
"@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"@typescript-eslint/parser": "^6.13.1", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-deprecation": "^2.0.0", | ||
"eslint-plugin-import": "^2.29.0", | ||
"eslint-plugin-jest": "^27.6.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-unicorn": "^49.0.0", | ||
"eslint": "^8.54.0", | ||
"express-multipart-file-parser": "^0.1.2", | ||
"express": "^4.18.2", | ||
"jest-expect-message": "^1.1.3", | ||
"jest-extended": "^4.0.2", | ||
"jest-mock-extended": "^3.0.5", | ||
"jest": "^29.7.0", | ||
"mockttp": "^3.9.4", | ||
"prettier-plugin-organize-imports": "^3.2.4", | ||
"prettier": "^3.1.0", | ||
"rimraf": "^5.0.5", | ||
"supertest": "^6.3.3", | ||
"ts-jest": "^29.1.1", | ||
"ts-loader": "^9.5.1", | ||
"ts-node": "^10.9.1", | ||
"tsconfig-paths": "^4.2.0", | ||
"typescript": "^5.3.2" | ||
}, | ||
"engines": { | ||
"yarn": "please use pnpm", | ||
"npm": "please use pnpm", | ||
"node": ">=20", | ||
"pnpm": ">=8" | ||
} | ||
} |
Oops, something went wrong.