[ACA-4646] Upgrade to Node 18 (#3163)

* regenerate lock file

* switch gha to node 18

* fix dependencies for Node 18

* fix the ci/cd command invokation

* update readme

* fix run-e2e command

* fix artifact name for e2e test results
This commit is contained in:
Denys Vuika 2023-05-05 16:37:51 +01:00 committed by GitHub
parent 222f487e70
commit efda5d1461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22088 additions and 12862 deletions

View File

@ -49,7 +49,7 @@ runs:
APP_CONFIG_FILE_PATH="${{ inputs.to }}/app.config.json" APP_CONFIG_FILE_PATH="${{ inputs.to }}/app.config.json"
npx envsub --all $APP_CONFIG_FILE_PATH $APP_CONFIG_FILE_PATH || exit 1 npx envsub --all $APP_CONFIG_FILE_PATH $APP_CONFIG_FILE_PATH || exit 1
echo -n " \_ Validating replaced config file ... "; echo -n " \_ Validating replaced config file ... ";
$(npm bin)/ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d $APP_CONFIG_FILE_PATH --errors=text --verbose || exit 4 npx ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d $APP_CONFIG_FILE_PATH --errors=text --verbose || exit 4
if grep -E -q '\$\{[A-Z0-9_]*\}' $APP_CONFIG_FILE_PATH; then if grep -E -q '\$\{[A-Z0-9_]*\}' $APP_CONFIG_FILE_PATH; then
echo -e "\e[31m \_ ERROR: Variables are still present in the app.config.json file. Some of them might not have default value set.\e[0m"; echo -e "\e[31m \_ ERROR: Variables are still present in the app.config.json file. Some of them might not have default value set.\e[0m";
exit 5; exit 5;

View File

@ -11,6 +11,10 @@ inputs:
required: false required: false
type: string type: string
default: 'protractor' default: 'protractor'
artifact-name:
description: Name of the artifact cache
required: true
type: string
runs: runs:
using: "composite" using: "composite"
@ -39,7 +43,7 @@ runs:
echo "APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html" echo "APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html"
} >> .env } >> .env
npm start content-ce > /dev/null &\ npm start > /dev/null &\
if [ ${{ inputs.test-runner }} == "playwright" ]; then if [ ${{ inputs.test-runner }} == "playwright" ]; then
echo "Running playwright tests with options ${{ inputs.options }}" echo "Running playwright tests with options ${{ inputs.options }}"
@ -55,5 +59,5 @@ runs:
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ inputs.options }} name: ${{ inputs.artifact-name }}
path: test-results/ path: test-results/

View File

@ -174,6 +174,7 @@ jobs:
- uses: ./.github/actions/run-e2e - uses: ./.github/actions/run-e2e
with: with:
options: "--suite=${{ matrix.e2e-suites.name }}" options: "--suite=${{ matrix.e2e-suites.name }}"
artifact-name: ${{ matrix.e2e-suites.name }}
- uses: ./.github/actions/after-e2e - uses: ./.github/actions/after-e2e
e2es-playwright: e2es-playwright:
@ -207,6 +208,7 @@ jobs:
- uses: ./.github/actions/run-e2e - uses: ./.github/actions/run-e2e
with: with:
options: "e2e/playwright/tests/folder-rules/playwright.config.ts" options: "e2e/playwright/tests/folder-rules/playwright.config.ts"
artifact-name: folder-rules
test-runner: playwright test-runner: playwright
- uses: ./.github/actions/after-e2e - uses: ./.github/actions/after-e2e

2
.nvmrc
View File

@ -1 +1 @@
14 18

View File

@ -50,7 +50,7 @@ Run the following commands:
```sh ```sh
npm install npm install
npm start content-ce npm start
``` ```
### Using Local ADF ### Using Local ADF
@ -58,7 +58,7 @@ npm start content-ce
Clone the `alfresco-ng2-components` and `alfresco-content-app` repositories in the same folder, and run the following command: Clone the `alfresco-ng2-components` and `alfresco-content-app` repositories in the same folder, and run the following command:
```sh ```sh
npm start content-ce -- --configuration=adf npm start -- --configuration=adf
``` ```
Changing the ADF code results in the recompilation and hot-reloading of the ACA application. Changing the ADF code results in the recompilation and hot-reloading of the ACA application.

34886
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"validate-app-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./app/.tmp/app.config.json --errors=text --verbose", "validate-app-config": "ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d ./app/.tmp/app.config.json --errors=text --verbose",
"assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --env APP_CONFIG_PROVIDER=ECM --env APP_CONFIG_AUTH_TYPE=BASIC --env APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco --env APP_CONFIG_OAUTH2_CLIENTID=alfresco --env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true --env APP_CONFIG_OAUTH2_SILENT_LOGIN=true --env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html --env APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/ --env APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/logout --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json", "assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --env APP_CONFIG_PROVIDER=ECM --env APP_CONFIG_AUTH_TYPE=BASIC --env APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco --env APP_CONFIG_OAUTH2_CLIENTID=alfresco --env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true --env APP_CONFIG_OAUTH2_SILENT_LOGIN=true --env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html --env APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/ --env APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/logout --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config", "prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config",
"start": "nx serve", "start": "nx serve content-ce",
"start:prod": "npm run validate-app-config && node --max-old-space-size=8192 nx serve content-ce --configuration production", "start:prod": "npm run validate-app-config && node --max-old-space-size=8192 nx serve content-ce --configuration production",
"prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json", "prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"build": "nx build content-ce", "build": "nx build content-ce",
@ -38,24 +38,24 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": "6.0.0", "@alfresco/adf-content-services": "6.1.0-4893268711",
"@alfresco/adf-core": "6.0.0", "@alfresco/adf-core": "6.1.0-4893268711",
"@alfresco/adf-extensions": "6.0.0", "@alfresco/adf-extensions": "6.1.0-4893268711",
"@alfresco/js-api": "6.0.0", "@alfresco/js-api": "6.0.0",
"@angular/animations": "14.1.2", "@angular/animations": "14.1.3",
"@angular/cdk": "14.1.2", "@angular/cdk": "14.1.3",
"@angular/common": "14.1.2", "@angular/common": "14.1.3",
"@angular/compiler": "14.1.2", "@angular/compiler": "14.1.3",
"@angular/core": "14.1.2", "@angular/core": "14.1.3",
"@angular/flex-layout": "^14.0.0-beta.40", "@angular/flex-layout": "^14.0.0-beta.40",
"@angular/forms": "14.1.2", "@angular/forms": "14.1.3",
"@angular/material": "14.1.2", "@angular/material": "14.1.3",
"@angular/material-moment-adapter": "14.1.2", "@angular/material-moment-adapter": "14.1.3",
"@angular/platform-browser": "14.1.2", "@angular/platform-browser": "14.1.3",
"@angular/platform-browser-dynamic": "14.1.2", "@angular/platform-browser-dynamic": "14.1.3",
"@angular/router": "14.1.2", "@angular/router": "14.1.3",
"@mat-datetimepicker/core": "^9.0.68", "@mat-datetimepicker/core": "^10.1.1",
"@mat-datetimepicker/moment": "^9.0.68", "@mat-datetimepicker/moment": "^10.1.1",
"@ngrx/effects": "^14.2.0", "@ngrx/effects": "^14.2.0",
"@ngrx/router-store": "^14.2.0", "@ngrx/router-store": "^14.2.0",
"@ngrx/store": "^14.2.0", "@ngrx/store": "^14.2.0",
@ -70,9 +70,9 @@
"zone.js": "0.11.8" "zone.js": "0.11.8"
}, },
"devDependencies": { "devDependencies": {
"@alfresco/adf-cli": "6.0.0", "@alfresco/adf-cli": "6.1.0-4893268711",
"@alfresco/adf-testing": "6.0.0", "@alfresco/adf-testing": "6.1.0-4893268711",
"@angular-devkit/build-angular": "14.2.11", "@angular-devkit/build-angular": "14.1.3",
"@angular-devkit/core": "14.1.2", "@angular-devkit/core": "14.1.2",
"@angular-devkit/schematics": "14.1.2", "@angular-devkit/schematics": "14.1.2",
"@angular-eslint/builder": "^14.1.2", "@angular-eslint/builder": "^14.1.2",
@ -80,9 +80,9 @@
"@angular-eslint/eslint-plugin-template": "^15.2.0", "@angular-eslint/eslint-plugin-template": "^15.2.0",
"@angular-eslint/schematics": "14.4.0", "@angular-eslint/schematics": "14.4.0",
"@angular-eslint/template-parser": "^15.2.1", "@angular-eslint/template-parser": "^15.2.1",
"@angular/cli": "14.1.2", "@angular/cli": "14.1.3",
"@angular/compiler-cli": "14.1.2", "@angular/compiler-cli": "14.1.3",
"@angular/language-service": "14.1.2", "@angular/language-service": "14.1.3",
"@cspell/eslint-plugin": "^6.31.1", "@cspell/eslint-plugin": "^6.31.1",
"@nrwl/angular": "15.9.2", "@nrwl/angular": "15.9.2",
"@nrwl/eslint-plugin-nx": "^15.9.2", "@nrwl/eslint-plugin-nx": "^15.9.2",