Skip to content
Snippets Groups Projects
Commit 237f29c6 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6238 OZG-7130 Add marge, use pnpm instead of npx

parent 8dfb2421
No related branches found
No related tags found
1 merge request!1OZG-6238 NPM durch PNPM ersetzen
...@@ -41,7 +41,7 @@ if [ -z $CONFIG_FILE ]; then echo "Config File not set" && exit 1; fi ...@@ -41,7 +41,7 @@ if [ -z $CONFIG_FILE ]; then echo "Config File not set" && exit 1; fi
SCRIPT_DIR="$(dirname "$0")" SCRIPT_DIR="$(dirname "$0")"
BASE_PATH=${SCRIPT_DIR}/${APP_NAME} BASE_PATH=${SCRIPT_DIR}/${APP_NAME}
SPEC_GROUP=${BASE_PATH}/src/e2e/${APP_VARIATION} SPEC_GROUP=${BASE_PATH}/src/e2e/${APP_VARIATION}
COMMAND="npx cypress run --project ${BASE_PATH} --spec ${SPEC_GROUP} --config-file ${CONFIG_FILE}" COMMAND="pnpm exec cypress run --project ${BASE_PATH} --spec ${SPEC_GROUP} --config-file ${CONFIG_FILE}"
REPORT_PATH=${BASE_PATH}/reports/${APP_VARIATION} REPORT_PATH=${BASE_PATH}/reports/${APP_VARIATION}
echo "Run E2E for ${APP_NAME} with command: '$COMMAND'" echo "Run E2E for ${APP_NAME} with command: '$COMMAND'"
...@@ -57,10 +57,10 @@ if [ -d "${REPORT_PATH}" ]; then ...@@ -57,10 +57,10 @@ if [ -d "${REPORT_PATH}" ]; then
MOCHA_REPORT_FILE=${MOCHA_REPORT_PATH}report.json MOCHA_REPORT_FILE=${MOCHA_REPORT_PATH}report.json
mv ${MOCHA_REPORT_JSONS} ${MOCHA_REPORT_PATH}/jsons mv ${MOCHA_REPORT_JSONS} ${MOCHA_REPORT_PATH}/jsons
npx mochawesome-merge ${MOCHA_REPORT_PATH}**/*.json > ${MOCHA_REPORT_FILE} pnpm exec mochawesome-merge ${MOCHA_REPORT_PATH}**/*.json > ${MOCHA_REPORT_FILE}
# Workaround: mochawesome's "screenshotsFolder" value is not added in the generated HTML file. Add "screenshots" to image paths. # Workaround: mochawesome's "screenshotsFolder" value is not added in the generated HTML file. Add "screenshots" to image paths.
sed --in-place --regexp-extended 's/"([^"]*\.png)/"screenshots\1/' ${MOCHA_REPORT_FILE} sed --in-place --regexp-extended 's/"([^"]*\.png)/"screenshots\1/' ${MOCHA_REPORT_FILE}
npx marge ${MOCHA_REPORT_FILE} -f report -o ${REPORT_PATH} pnpm exec marge ${MOCHA_REPORT_FILE} -f report -o ${REPORT_PATH}
else else
echo "ERROR: Reports do not exist at ${REPORT_PATH}" echo "ERROR: Reports do not exist at ${REPORT_PATH}"
fi fi
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"ci-prodBuild": "nx run alfa:build --outputHashing=all --configuration production", "ci-prodBuild": "nx run alfa:build --outputHashing=all --configuration production",
"ci-prodBuild-admin": "nx container admin", "ci-prodBuild-admin": "nx container admin",
"ci-test": "nx run-many --target=test --parallel 20 -- --runInBand", "ci-test": "nx run-many --target=test --parallel 20 -- --runInBand",
"ci-sonar": "nx run-many --target=test --parallel 20 -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner", "ci-sonar": "nx run-many --target=test --parallel 20 -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && pnpm exec sonar-scanner",
"lint": "nx workspace-lint && nx lint", "lint": "nx workspace-lint && nx lint",
"affected:apps": "nx affected:apps", "affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs", "affected:libs": "nx affected:libs",
...@@ -38,14 +38,14 @@ ...@@ -38,14 +38,14 @@
"dep-graph": "nx dep-graph", "dep-graph": "nx dep-graph",
"help": "nx help", "help": "nx help",
"favicon": "real-favicon generate favicon/faviconDescription.json favicon/faviconData.json src/favicon", "favicon": "real-favicon generate favicon/faviconDescription.json favicon/faviconData.json src/favicon",
"cypress:run": "npx cypress run --project apps/alfa-e2e", "cypress:run": "pnpm exec cypress run --project apps/alfa-e2e",
"cypress:run-main": "npx cypress run --project apps/alfa-e2e --spec apps/alfa-e2e/src/e2e/main-tests", "cypress:run-main": "pnpm exec cypress run --project apps/alfa-e2e --spec apps/alfa-e2e/src/e2e/main-tests",
"cypress:run-ea": "npx cypress run --project apps/alfa-e2e --spec apps/alfa-e2e/src/e2e/einheitlicher-ansprechpartner", "cypress:run-ea": "pnpm exec cypress run --project apps/alfa-e2e --spec apps/alfa-e2e/src/e2e/einheitlicher-ansprechpartner",
"cypress:run-admin": "npx cypress run --project apps/admin-e2e", "cypress:run-admin": "pnpm exec cypress run --project apps/admin-e2e",
"cypress:version": "npx cypress version", "cypress:version": "pnpm exec cypress version",
"cypress:install": "npx cypress install", "cypress:install": "pnpm exec cypress install",
"cypress:open": "npx cypress open --project apps/alfa-e2e", "cypress:open": "pnpm exec cypress open --project apps/alfa-e2e",
"cypress:open-admin": "npx cypress open --project apps/admin-e2e", "cypress:open-admin": "pnpm exec cypress open --project apps/admin-e2e",
"workspace-generator": "nx workspace-generator", "workspace-generator": "nx workspace-generator",
"storybook": "nx storybook design-system", "storybook": "nx storybook design-system",
"ci-storybook": "nx build-storybook design-system && nx container design-system" "ci-storybook": "nx build-storybook design-system && nx container design-system"
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
"jsonc-eslint-parser": "^2.4.0", "jsonc-eslint-parser": "^2.4.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mochawesome-merge": "^4.3.0", "mochawesome-merge": "^4.3.0",
"mochawesome-report-generator": "^6.2.0",
"mongodb": "^4.17.2", "mongodb": "^4.17.2",
"ng-mocks": "^14.13.1", "ng-mocks": "^14.13.1",
"ng-packagr": "18.2.1", "ng-packagr": "18.2.1",
......
...@@ -313,6 +313,9 @@ importers: ...@@ -313,6 +313,9 @@ importers:
mochawesome-merge: mochawesome-merge:
specifier: ^4.3.0 specifier: ^4.3.0
version: 4.3.0 version: 4.3.0
mochawesome-report-generator:
specifier: ^6.2.0
version: 6.2.0
mongodb: mongodb:
specifier: ^4.17.2 specifier: ^4.17.2
version: 4.17.2(@aws-sdk/client-sso-oidc@3.687.0(@aws-sdk/client-sts@3.687.0)) version: 4.17.2(@aws-sdk/client-sso-oidc@3.687.0(@aws-sdk/client-sts@3.687.0))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment