Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/abaplint/rename_test.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
// Rename smoke test for the test_rename workflow: renames every sample
// (and the abap2UI5 framework it references) from the z2ui5 namespace to
// the placeholder zabap2ui5 and syntax-checks the result. This proves the
// basic samples stay renameable for a parallel installation alongside a
// renamed abap2UI5 (see https://abap2ui5.github.io/docs/advanced/renaming.html).
// Scoped to the portable src/01 set - it is the only namespace-clean,
// dependency-free-of-src/00 area (src/00 is stripped from the cloud/702
// builds and carries non-ABAP objects that are out of scope for renaming).
// Runs standalone as well:
// npx abaplint .github/abaplint/rename_test.jsonc --rename
"global": {
"files": "/../../src/01/**/*.*"
},
"dependencies": [
{
"url": "https://github.com/abapedia/steampunk-2305-api-intersect-702",
"files": "/src/**/*.*"
},
{
"url": "https://github.com/abap2UI5/abap2UI5",
"files": "/src/**/*.*"
}
],
"rename": {
"output": "output",
"patterns": [
{
"type": "CLAS|INTF|TABL",
"oldName": "^z2ui5(.*)$",
"newName": "zabap2ui5$1"
}
]
},
"syntax": {
"version": "v750",
"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
}
}
29 changes: 29 additions & 0 deletions .github/workflows/test_rename.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: test_rename

# Smoke test that the basic samples (and the abap2UI5 framework they
# reference) can be renamed from the z2ui5 namespace to another one for a
# parallel installation - runs the abaplint rename with the checked-in
# config .github/abaplint/rename_test.jsonc and syntax-checks the result.

on:
pull_request:

permissions:
contents: read

concurrency:
group: test_rename-${{ github.ref }}
cancel-in-progress: true

jobs:
test_rename:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm run rename
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![auto_cloud](https://github.com/abap2UI5/samples/actions/workflows/auto_cloud.yaml/badge.svg)](https://github.com/abap2UI5/samples/actions/workflows/auto_cloud.yaml)
[![auto_downport](https://github.com/abap2UI5/samples/actions/workflows/auto_downport.yaml/badge.svg)](https://github.com/abap2UI5/samples/actions/workflows/auto_downport.yaml)
<br>
[![renaming](https://github.com/abap2UI5/samples/actions/workflows/rename_test.yaml/badge.svg)](https://github.com/abap2UI5/samples/actions/workflows/rename_test.yaml)
[![test_rename](https://github.com/abap2UI5/samples/actions/workflows/test_rename.yaml/badge.svg)](https://github.com/abap2UI5/samples/actions/workflows/test_rename.yaml)

# abap2UI5-samples

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"description": "Learn how to code with abap2UI5.",
"scripts": {
"launchpad": "node scripts/generate-launchpad.js",
"rename": "abaplint .github/abaplint/rename_test.jsonc --rename",
"check:agents": "node scripts/check-agents-structure.js",
"syfixes": "find . -type f -name '*.abap' -exec sed -i -e 's/ RAISE EXCEPTION TYPE cx_sy_itab_line_not_found/ ASSERT 1 = 0/g' {} + ",
"abaplintpathfix": "sed -i 's|\"files\": \"/\\.\\.\\/\\.\\.\\/src\\/\\*\\*\\/\\*\\.\\*\"|\"files\": \"/src/**/*.*\"|g' abaplint.jsonc",
Expand Down