From d04de18cbd41ef254b61c3ce402c147d7ee3dfd9 Mon Sep 17 00:00:00 2001 From: oblomov-dev <102328295+oblomov-dev@users.noreply.github.com> Date: Thu, 12 Sep 2024 23:52:38 +0200 Subject: [PATCH] update_ci_configs (#1422) * update * Delete .gitignore * Create unit_test.yml * Update unit_test.yml * Create rename_test.yml * Delete .github/workflows/test_rename.yml * Delete .github/workflows/test.yml * Update rename_test.yml * Update unit_test.yml * Delete ci/abaplint_rename.jsonc * Update unit_test.yml * Delete ci/abaplint-downport.jsonc * Update build_downport.yaml * Rename abaplint-abap_cloud_readiness.jsonc to abap_cloud_check.jsonc * Rename abaplint-standard_abap_readiness.jsonc to standard_abap_check.jsonc * Update abaplint-app.json * Rename standard_abap_check.jsonc to abap_standard_check.jsonc * Update abaplint-app.json * Update unit_test.yml * Update rename_test.yml * update * Update rename_test.yml * update * Update rename_test.yml * Update rename_test.yml * Update rename_test.yml * Update unit_test.yml * Update playwright.yml * Update unit_test.yml * Update build_downport.yaml --- .github/workflows/build_downport.yaml | 1 + .github/workflows/playwright.yml | 8 +- .github/workflows/rename_test.yml | 20 +++ .github/workflows/test_rename.yml | 20 --- .github/workflows/{test.yml => unit_test.yml} | 10 +- .gitignore | 3 - abaplint-app.json | 4 +- ...readiness.jsonc => abap_cloud_check.jsonc} | 0 ...diness.jsonc => abap_standard_check.jsonc} | 0 ci/abap_transpile.json | 24 --- ci/abaplint-downport.jsonc | 31 ---- ci/abaplint_rename.jsonc | 42 ----- ci/setup.mjs | 8 - package-lock.json | 170 ------------------ package.json | 33 ---- 15 files changed, 31 insertions(+), 343 deletions(-) create mode 100644 .github/workflows/rename_test.yml delete mode 100644 .github/workflows/test_rename.yml rename .github/workflows/{test.yml => unit_test.yml} (60%) delete mode 100644 .gitignore rename ci/{abaplint-abap_cloud_readiness.jsonc => abap_cloud_check.jsonc} (100%) rename ci/{abaplint-standard_abap_readiness.jsonc => abap_standard_check.jsonc} (100%) delete mode 100644 ci/abap_transpile.json delete mode 100644 ci/abaplint-downport.jsonc delete mode 100644 ci/abaplint_rename.jsonc delete mode 100644 ci/setup.mjs delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/.github/workflows/build_downport.yaml b/.github/workflows/build_downport.yaml index bd46ee85..89b67a29 100644 --- a/.github/workflows/build_downport.yaml +++ b/.github/workflows/build_downport.yaml @@ -16,6 +16,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 + - run: git clone https://github.com/abap2UI5/abap2UI5-setup.git && cp -r abap2UI5-setup/* . && npm i - run: npm ci - run: npm run downport - name: send to downport repository diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 7a3a4677..110a62fc 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,10 +1,10 @@ -name: playwright-browser-tests +name: playwright-browser-test on: pull_request: permissions: contents: read jobs: - test: + run: timeout-minutes: 60 runs-on: ubuntu-latest steps: @@ -13,9 +13,9 @@ jobs: with: node-version: lts/* - name: Setup - run: git clone https://github.com/abap2UI5/web-abap2UI5-test.git && cp -r web-abap2UI5-test/* . && npm i + run: git clone https://github.com/abap2UI5/abap2UI5-setup.git && cp -r abap2UI5-setup/* . && npm i - name: Install dependencies - run: npm ci && npm run downport && npm run transpile && node output/index.mjs + run: npm run build - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests diff --git a/.github/workflows/rename_test.yml b/.github/workflows/rename_test.yml new file mode 100644 index 00000000..14812506 --- /dev/null +++ b/.github/workflows/rename_test.yml @@ -0,0 +1,20 @@ +name: test-renaming + +on: + pull_request: + +permissions: + contents: read + +jobs: + run: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16' + - run: git clone https://github.com/abap2UI5/abap2UI5-renamed.git + - run: mkdir abap2UI5-renamed/input && mkdir abap2UI5-renamed/input/abap2UI5 && cp -r src abap2UI5-renamed/input/abap2UI5/src && cp -r abap2UI5-renamed/* . && npm i && rm -rf src/* + - run: npm run main diff --git a/.github/workflows/test_rename.yml b/.github/workflows/test_rename.yml deleted file mode 100644 index 7ccd2d8d..00000000 --- a/.github/workflows/test_rename.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: test-abaplint-renaming-feature - -on: - pull_request: - -permissions: - contents: read - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '16' - - run: npm install @abaplint/cli -g - - run: npm run rename - diff --git a/.github/workflows/test.yml b/.github/workflows/unit_test.yml similarity index 60% rename from .github/workflows/test.yml rename to .github/workflows/unit_test.yml index 194f9c97..4e6f89b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/unit_test.yml @@ -1,4 +1,4 @@ -name: test-downporting-transpiling-unit_testing +name: downport-unit-tests on: pull_request: @@ -7,7 +7,7 @@ permissions: contents: read jobs: - test: + run: runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -15,8 +15,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '16' - - run: npm ci - - run: npm run downport - - run: npm run transpile + - run: git clone https://github.com/abap2UI5/abap2UI5-setup.git && cp -r abap2UI5-setup/* . && npm i + - run: npm run build - run: npm run unit - diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7d74cbe0..00000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -downport -node_modules -output \ No newline at end of file diff --git a/abaplint-app.json b/abaplint-app.json index 22123cc2..10a4619f 100644 --- a/abaplint-app.json +++ b/abaplint-app.json @@ -4,10 +4,10 @@ "filename": "./ci/abaplint.jsonc" }, "abap_standard_readiness": { - "filename": "./ci/abaplint-standard_abap_readiness.jsonc" + "filename": "./ci/abap_standard_check.jsonc" }, "abap_cloud_readiness": { - "filename": "./ci/abaplint-abap_cloud_readiness.jsonc" + "filename": "./ci/abap_cloud_check.jsonc" } } } diff --git a/ci/abaplint-abap_cloud_readiness.jsonc b/ci/abap_cloud_check.jsonc similarity index 100% rename from ci/abaplint-abap_cloud_readiness.jsonc rename to ci/abap_cloud_check.jsonc diff --git a/ci/abaplint-standard_abap_readiness.jsonc b/ci/abap_standard_check.jsonc similarity index 100% rename from ci/abaplint-standard_abap_readiness.jsonc rename to ci/abap_standard_check.jsonc diff --git a/ci/abap_transpile.json b/ci/abap_transpile.json deleted file mode 100644 index 48522526..00000000 --- a/ci/abap_transpile.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "input_folder": "downport", - "input_filter": [], - "output_folder": "output", - "libs": [ - { - "url": "https://github.com/open-abap/open-abap-core" - } - ], - "write_unit_tests": true, - "write_source_map": true, - "options": { - "ignoreSyntaxCheck": false, - "addFilenames": true, - "addCommonJS": true, - "skipReposrc": true, - "unknownTypes": "runtimeError", - "keywords": ["return", "in", "class", "for", "delete", "default", "var"], - "extraSetup": "../ci/setup.mjs", - "skip": [ - {"object": "Z2UI5_CL_AJSON", "class": "ltcl_parser_test", "method": "parse_error", "note": "NodeJS 20 does not set position of parsing error"} - ] - } -} diff --git a/ci/abaplint-downport.jsonc b/ci/abaplint-downport.jsonc deleted file mode 100644 index e221c151..00000000 --- a/ci/abaplint-downport.jsonc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "global": { - "files": "/../downport/**/*.*" - }, - "dependencies": [ - { - "url": "https://github.com/abapedia/steampunk-2305-api", - "folder": "/deps", - "files": "/src/**/*.*" - } - ], - "syntax": { - "version": "v702", - "errorNamespace": "." - }, - "rules": { - "downport": true, - "begin_end_names": true, - "check_ddic": true, - "check_include": true, - "check_syntax": true, - "global_class": true, - "definitions_top": true, - "implement_methods": true, - "method_implemented_twice": true, - "parser_error": true, - "superclass_final": true, - "unknown_types": true, - "xml_consistency": true - } -} diff --git a/ci/abaplint_rename.jsonc b/ci/abaplint_rename.jsonc deleted file mode 100644 index c62b18c9..00000000 --- a/ci/abaplint_rename.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -{ - "global": { - "files": "/../src/**/*.*" - }, - "dependencies": [ - { - "url": "https://github.com/abapedia/steampunk-2305-api-intersect-702", - "files": "/src/**/*.*" - } - ], - "rename": { - "output": "output", - "patterns": [ - { - "type": "CLAS|INTF|TABL", - "oldName": "z2ui5_(.*)", - "newName": "/YYY/A5123_$1" - } - ] - }, - "syntax": { - "version": "v757", - "errorNamespace": "." - }, - "rules": { - "allowed_object_types": { - "allowed": ["CLAS", "DEVC", "INTF", "TABL"] - }, - "allowed_object_naming": true, - "begin_end_names": true, - "check_ddic": true, - "check_include": true, - "check_syntax": true, - "global_class": true, - "implement_methods": true, - "method_implemented_twice": true, - "parser_error": true, - "superclass_final": true, - "unknown_types": true, - "xml_consistency": true - } - } diff --git a/ci/setup.mjs b/ci/setup.mjs deleted file mode 100644 index e87b65f4..00000000 --- a/ci/setup.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import {SQLiteDatabaseClient} from "@abaplint/database-sqlite"; - -export async function setup(abap, schemas, insert) { - abap.context.databaseConnections["DEFAULT"] = new SQLiteDatabaseClient(); - await abap.context.databaseConnections["DEFAULT"].connect(); - await abap.context.databaseConnections["DEFAULT"].execute(schemas.sqlite); - await abap.context.databaseConnections["DEFAULT"].execute(insert); -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index ade45cdc..00000000 --- a/package-lock.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "name": "abap2ui5", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "abap2ui5", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "npm-check-updates": "^17.1.1" - }, - "devDependencies": { - "@abaplint/cli": "^2.113.6", - "@abaplint/database-sqlite": "^2.8.25", - "@abaplint/runtime": "^2.10.16", - "@abaplint/transpiler-cli": "^2.10.16" - } - }, - "node_modules/@abaplint/cli": { - "version": "2.113.6", - "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.113.6.tgz", - "integrity": "sha512-z0HubOdRjXgRtqZZ1ZP9u9VArEE09D6tlQBNuH1NDdeWNbBzSEzCGJtzv1JeUakJosjVWZL2W5AtPZSDXKMaQw==", - "dev": true, - "license": "MIT", - "bin": { - "abaplint": "abaplint" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/larshp" - } - }, - "node_modules/@abaplint/database-sqlite": { - "version": "2.8.25", - "resolved": "https://registry.npmjs.org/@abaplint/database-sqlite/-/database-sqlite-2.8.25.tgz", - "integrity": "sha512-kiRA7304sR6AACd6KF4pJKg9MQ6EHjR8GQcDCOCEZSLBlHjvmS8UadxQfuPB0DNncRIPVGxvlf+xh1sRtmuAvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sql.js": "^1.10.3" - } - }, - "node_modules/@abaplint/runtime": { - "version": "2.10.16", - "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.10.16.tgz", - "integrity": "sha512-Z25ay1QiKhEUPGD742CuZdEI71yFG4BKXzO8mtJzBWMIiwDau7L7Dw1+o3FJ81K4wVejJP+NeKjD8k3tbHur2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "temporal-polyfill": "^0.2.5" - }, - "funding": { - "url": "https://github.com/sponsors/larshp" - } - }, - "node_modules/@abaplint/transpiler-cli": { - "version": "2.10.16", - "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.10.16.tgz", - "integrity": "sha512-CcgkaV7gkVhidYdzYfVhDZqs98l6WDBwg8NxXvxPvnpITyp2Scn81JaRI6PnhoB/LkAcRQqFcjp3xNetRldIWw==", - "dev": true, - "license": "MIT", - "bin": { - "abap_transpile": "abap_transpile" - }, - "funding": { - "url": "https://github.com/sponsors/larshp" - } - }, - "node_modules/npm-check-updates": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.1.tgz", - "integrity": "sha512-2aqIzGAEWB7xPf0hKHTkNmUM5jHbn2S5r2/z/7dA5Ij2h/sVYAg9R/uVkaUC3VORPAfBm7pKkCWo6E9clEVQ9A==", - "license": "Apache-2.0", - "bin": { - "ncu": "build/cli.js", - "npm-check-updates": "build/cli.js" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0", - "npm": ">=8.12.1" - } - }, - "node_modules/sql.js": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.11.0.tgz", - "integrity": "sha512-GsLUDU3vhOo14Pd5ME0y2te49JQyby6HuoCuadevEV+CGgTUjmYRrm7B7lhRyzOgrmcWmspUfyjNb6sOAEqdsA==", - "dev": true, - "license": "MIT" - }, - "node_modules/temporal-polyfill": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", - "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", - "dev": true, - "license": "MIT", - "dependencies": { - "temporal-spec": "^0.2.4" - } - }, - "node_modules/temporal-spec": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", - "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", - "dev": true, - "license": "ISC" - } - }, - "dependencies": { - "@abaplint/cli": { - "version": "2.113.6", - "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.113.6.tgz", - "integrity": "sha512-z0HubOdRjXgRtqZZ1ZP9u9VArEE09D6tlQBNuH1NDdeWNbBzSEzCGJtzv1JeUakJosjVWZL2W5AtPZSDXKMaQw==", - "dev": true - }, - "@abaplint/database-sqlite": { - "version": "2.8.25", - "resolved": "https://registry.npmjs.org/@abaplint/database-sqlite/-/database-sqlite-2.8.25.tgz", - "integrity": "sha512-kiRA7304sR6AACd6KF4pJKg9MQ6EHjR8GQcDCOCEZSLBlHjvmS8UadxQfuPB0DNncRIPVGxvlf+xh1sRtmuAvg==", - "dev": true, - "requires": { - "sql.js": "^1.10.3" - } - }, - "@abaplint/runtime": { - "version": "2.10.16", - "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.10.16.tgz", - "integrity": "sha512-Z25ay1QiKhEUPGD742CuZdEI71yFG4BKXzO8mtJzBWMIiwDau7L7Dw1+o3FJ81K4wVejJP+NeKjD8k3tbHur2g==", - "dev": true, - "requires": { - "temporal-polyfill": "^0.2.5" - } - }, - "@abaplint/transpiler-cli": { - "version": "2.10.16", - "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.10.16.tgz", - "integrity": "sha512-CcgkaV7gkVhidYdzYfVhDZqs98l6WDBwg8NxXvxPvnpITyp2Scn81JaRI6PnhoB/LkAcRQqFcjp3xNetRldIWw==", - "dev": true - }, - "npm-check-updates": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.1.tgz", - "integrity": "sha512-2aqIzGAEWB7xPf0hKHTkNmUM5jHbn2S5r2/z/7dA5Ij2h/sVYAg9R/uVkaUC3VORPAfBm7pKkCWo6E9clEVQ9A==" - }, - "sql.js": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.11.0.tgz", - "integrity": "sha512-GsLUDU3vhOo14Pd5ME0y2te49JQyby6HuoCuadevEV+CGgTUjmYRrm7B7lhRyzOgrmcWmspUfyjNb6sOAEqdsA==", - "dev": true - }, - "temporal-polyfill": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", - "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", - "dev": true, - "requires": { - "temporal-spec": "^0.2.4" - } - }, - "temporal-spec": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", - "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", - "dev": true - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index fb2f5c1d..00000000 --- a/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "abap2ui5", - "private": true, - "version": "1.0.0", - "description": "Developing UI5 Apps purely in ABAP.", - "scripts": { - "syfixes": "find . -type f -name '*.abap' -exec sed -i -e 's/ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found/ ASSERT 1 = 0/g' {} + ", - "downport": "rm -rf downport && cp -r src downport && abaplint --fix ./ci/abaplint-downport.jsonc && npm run syfixes", - "unit": "echo RUNNING && node output/index.mjs", - "transpile": "rm -rf output && abap_transpile ci/abap_transpile.json", - "test": "npm run downport && npm run transpile && npm run unit", - "rename": "abaplint ./ci/abaplint_rename.jsonc --rename", - "cleanup": "rm -rf input && rm -rf output" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/abap2UI5/abap2UI5.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/abap2UI5/abap2UI5/issues" - }, - "homepage": "https://github.com/abap2UI5/abap2UI5#readme", - "devDependencies": { - "@abaplint/cli": "^2.113.6", - "@abaplint/database-sqlite": "^2.8.25", - "@abaplint/runtime": "^2.10.16", - "@abaplint/transpiler-cli": "^2.10.16" - }, - "dependencies": { - "npm-check-updates": "^17.1.1" - } -}