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
20 changes: 19 additions & 1 deletion .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This workflow will protect the main branch by testing and linting new PRs and commits

name: Main CI
permissions:
contents: read

on:
push:
Expand Down Expand Up @@ -46,7 +48,23 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 24
cache: "npm"
- run: npm ci --package-lock
- run: npm run lint:ci

example-cap-server:
runs-on: ubuntu-latest
steps:
- name: Checkout safe merge ref
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
persist-credentials: false

- uses: actions/setup-node@v4
with:
node-version: 24
cache: "npm"
- run: npm ci --package-lock
- run: npm run test --prefix example-cap-server
19 changes: 16 additions & 3 deletions .github/workflows/main-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- run: npm ci --package-lock

Expand Down Expand Up @@ -61,7 +60,21 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
node-version: 24
- run: npm ci --package-lock
- run: npm run lint:ci

example-cap-server:
runs-on: ubuntu-latest
steps:
- name: Checkout safe merge ref
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
persist-credentials: false

- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci --package-lock
- run: npm run test --prefix example-cap-server
71 changes: 2 additions & 69 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,84 +39,17 @@ target/report/
zdm_report.json

# test csn
srv/test-csn.json

# test e2e needed chrome driver version created localy
test/e2e/util/chromeDriverVersion.json
# created via pageIndexer.js
test/e2e/pageobjects/index.js
test-integration/_env/db/*

example-cap-server/data
example-cap-server/package-lock.json

# sqlite
*.db-journal
*.sqlite-journal

# mta
*.mtar
.mta/
.afc_mta_build_tmp/
mta-op-*/
Makefile_*.mta
mta_archives/

# notification types
srv/util-service/notification-service/notificationTypes.json

# UI
app/**/dist
di.code-validation.core_issues.json
!app/**/changes_preview.js
!app/**/sap-ui-cachebuster-info.json

app-deployer/resources
maintenance/dist

# frontend test metadata generated by npm run test:frontend:updateMetadata
app/*/webapp/localService/*.xml

# frontend mock and extension files
app/**/UIAdaptation_index.html
app/**/changes_preview.js
app/**/sap-ui-cachebuster-info.json
app/**/extended_runnable_file.html
app/**/mock_preview_sapui5.html
app/**/fioriHtmlRunner.html
app/**/visual_ext_index.html
app/**/webapp/visual_ext_index.html
app/**/.user.project.json

# mtx
.mtxcache.json
*.sqlite

# default env
default-env.json

# appInfo
appInfo.json

# performance measurement
stress-test-times-*.csv
stress-test-kpis-*.json
read-sql-statements-temp-logs.json
read-sql-scenario-temp-logs.json
/stress-test/src/warmup-stress-test-requests.json
/stress-test/src/warmup-stress-test-scenarios.json

# stryker temp files
.stryker-tmp

#piper and sapCumulusUpload
.pipeline/defaults.yaml
.pipeline/commonPipelineEnvironment/
.pipeline/default_pipeline_environment.yml
.pipeline/piper-defaults.yml
.pipeline/tmp/
sap-piper

test-integration/_env/db
*.hdbmigrationtable
test-integration/_env/db/last-dev

/dist/
6 changes: 5 additions & 1 deletion example-cap-server/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Example CAP Server
# How to get started

- `npm start` to start server
- `npm run subscribeTenants` to subscribe tenants to the CAP service
- restart server `npm start` for event-queue to start processing events
35 changes: 0 additions & 35 deletions example-cap-server/bin/subscribteTenants.js

This file was deleted.

Empty file removed example-cap-server/data/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions example-cap-server/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use strict";

module.exports = {
testTimeout: 600000,
};
97 changes: 41 additions & 56 deletions example-cap-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,56 @@
"version": "1.0.0",
"scripts": {
"postinstall": "npm run copy-library",
"start": "cds-serve",
"watch": "cds watch",
"subscribeTenants": "node bin/subscribteTenants.js",
"start": "cds-serve --with-mtx",
"watch": "cds watch --with-mtx",
"subscribeTenants": "cds subscribe t1 --to http://localhost:4004 -u yves: && cds subscribe t2 --to http://localhost:4004 -u yves: && cds subscribe t3 --to http://localhost:4004 -u yves:",
"dev": "npm run copy-library && npm run subscribeTenants && npm start",
"copy-library": "npx shx rm -rf node_modules/@cap-js-community/event-queue && npx shx mkdir -p node_modules/@cap-js-community/event-queue && npx shx cp -R ../package.json ../index.cds ../cds-plugin.js ../src ../db node_modules/@cap-js-community/event-queue"
"copy-library": "npx shx rm -rf node_modules/@cap-js-community/event-queue && npx shx mkdir -p node_modules/@cap-js-community/event-queue && npx shx cp -R ../package.json ../index.cds ../cds-plugin.js ../src ../srv ../db node_modules/@cap-js-community/event-queue",
"test": "CDS_ENV=test node --test"
},
"dependencies": {
"@cap-js-community/event-queue": "file:..",
"@cap-js/audit-logging": "^0.8.2",
"@sap/cds": "^8.8.2",
"@sap/cds-mtxs": "^2.6.1",
"express": "^4.21.2",
"verror": "^1.10.1"
"@cap-js/audit-logging": "^1.1.1",
"@sap/cds": "^9.5.1",
"@sap/cds-mtxs": "^3.5.0",
"express": "^4.21.2"
},
"devDependencies": {
"@cap-js/sqlite": "1.9.0",
"@cap-js/sqlite": "2.1.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.0.0",
"prettier": "3.5.3",
"sqlite3": "5.1.7",
"prettier": "3.7.4",
"redis": "^4.7.0",
"cron-parser": "^5.0.5",
"@sap/xssec": "^3.6.2"
"@sap/xssec": "^4.11.2",
"@cap-js-community/common": "^0.3.2",
"@cap-js/cds-test": "^0",
"jest": "30.2.0",
"cron-parser": "5.4.0",
"yaml": "2.8.2"
},
"cds": {
"eventQueue": {
"plugin": true,
"runInterval": 300000,
"useAsCAPQueue": true,
"thresholdLoggingEventProcessing": 5000,
"cleanupLocksAndEventsForDev": true,
"events": {
"Mail/Single": {
"impl": "./srv/EventQueueMail",
"load": 10,
"parallelEventProcessing": 5
}
},
"periodicEvents": {
"HealthCheck/DB": {
"impl": "./srv/EventQueueHealthCheckDb",
"load": 10,
"transactionMode": "alwaysRollback",
"interval": 15
},
"HealthCheck/DB-as-cron": {
"impl": "./srv/EventQueueHealthCheckDb",
"load": 10,
"transactionMode": "alwaysRollback",
"cron": "*/15 * * * * *"
}
}
"useAsCAPQueue": true
},
"requires": {
"outbox": true,
"outbox": false,
"multitenancy": true,
"[test]": {
"multitenancy": false,
"cds.xt.ModelProviderService": false,
"cds.xt.SaasProvisioningService": false,
"cds.xt.DeploymentService": false,
"cds.xt.ExtensibilityService": false
},
"cds.xt.ModelProviderService": true,
"cds.xt.SaasProvisioningService": true,
"cds.xt.DeploymentService": true,
"cds.xt.ExtensibilityService": false,
"db": {
"[development]": {
"kind": "sqlite",
"credentials": {
"database": "data/event-queue-demo.sqlite"
},
"schema_evolution": ""
}
},
"task-service": {
"impl": "./example-cap-server/srv/facade/task-service.js",
"outbox": {
"kind": "persistent-outbox",
"impl": "./srv/facade/task-service.js",
"queued": {
"kind": "persistent-queue",
"load": 60,
"transactionMode": "isolated",
"events": {
"syncJobs": {
"load": 10,
Expand All @@ -88,8 +63,18 @@
}
},
"mail-service": {
"impl": "./example-cap-server/srv/facade/mail-service.js"
"impl": "./srv/facade/mail-service.js",
"queued": {
"kind": "persistent-queue"
}
},
"[production]": {
"multitenancy": true
},
"[with-mtx]": {
"multitenancy": true
}
}
},
"profile": "with-mtx-sidecar"
}
}
23 changes: 0 additions & 23 deletions example-cap-server/srv/EventQueueClusteredMail.js

This file was deleted.

19 changes: 0 additions & 19 deletions example-cap-server/srv/EventQueueCryptoHash.js

This file was deleted.

Loading