Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
aeb4ea4
add cds-version to matrix
SirSimon04 Oct 29, 2025
3110da3
update peer dep
SirSimon04 Oct 29, 2025
a644b2a
update cds dep
SirSimon04 Oct 29, 2025
64b171d
rm input
SirSimon04 Oct 29, 2025
e4b5fef
update package
SirSimon04 Oct 29, 2025
eaf9d89
update action
SirSimon04 Oct 29, 2025
269983b
update sqlite
SirSimon04 Oct 29, 2025
30c4fe9
update sqlite version
SirSimon04 Oct 29, 2025
62275f5
next try of action
SirSimon04 Oct 29, 2025
b262a77
update dep
SirSimon04 Oct 29, 2025
f8c8674
update action
SirSimon04 Oct 29, 2025
4661b3e
update action
SirSimon04 Oct 29, 2025
5a98c0d
update action
SirSimon04 Oct 29, 2025
e771997
update action
SirSimon04 Oct 29, 2025
383a7c8
update hana action
SirSimon04 Oct 29, 2025
5bdd6d8
updata hana version
SirSimon04 Oct 29, 2025
2b42000
update action
SirSimon04 Oct 29, 2025
f14beea
update version
SirSimon04 Oct 29, 2025
6a55cea
Revert "update version"
SirSimon04 Oct 29, 2025
33ecd90
update action
SirSimon04 Oct 29, 2025
05cac7a
add dep
SirSimon04 Oct 29, 2025
54c7485
update action
SirSimon04 Oct 29, 2025
e2a888f
u
SirSimon04 Oct 29, 2025
85145fa
u
SirSimon04 Oct 29, 2025
625de4c
updates
SirSimon04 Oct 29, 2025
96c4431
updates
SirSimon04 Oct 29, 2025
d0d79de
.
SirSimon04 Oct 29, 2025
2b51d48
.
SirSimon04 Oct 29, 2025
b3851df
update
SirSimon04 Oct 29, 2025
0e284b5
Revert "update"
SirSimon04 Oct 29, 2025
54e6dca
update
SirSimon04 Oct 29, 2025
b805dd0
.
SirSimon04 Oct 29, 2025
8d12381
.
SirSimon04 Oct 29, 2025
f88080c
.
SirSimon04 Oct 29, 2025
204c5fd
.
SirSimon04 Oct 29, 2025
1c51cac
.
SirSimon04 Oct 29, 2025
d8e0084
update action
SirSimon04 Oct 30, 2025
3feceb6
update action
SirSimon04 Oct 30, 2025
8c95cf3
update release workflow
SirSimon04 Nov 3, 2025
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
38 changes: 29 additions & 9 deletions .github/actions/integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,50 @@ runs:
done

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g @sap/cds-dk

- name: Set CDS version-specific dependencies
shell: bash
- run: npm i
run: |
if [ "${{ matrix.cds-version }}" == "8" ]; then
echo "Installing CDS 8 compatible packages..."
npm pkg set "devDependencies.@cap-js/sqlite=^1.0.0"
npm pkg set "overrides.@cap-js/sqlite=^1.0.0"
npm pkg set "overrides.@cap-js/hana=^1.0.0"
npm pkg set "overrides.@cap-js/db-service=^1.0.0"
cd test/incidents-app
npm pkg set "dependencies.@cap-js/hana=^1.0.0"
npm pkg set "dependencies.@cap-js/db-service=^1.0.0"
cd ../..
fi

- name: Install global CDS
shell: bash
- run: cd test/incidents-app && npm i
run: npm i -g @sap/cds-dk@${{ matrix.cds-version }}

- name: Install root dependencies
shell: bash
run: |
npm install @sap/cds@${{ matrix.cds-version }}
npm install

- name: Set node env for HANA
run: echo "NODE_VERSION_HANA=$(echo ${{ inputs.NODE_VERSION }} | tr . _)" >> $GITHUB_ENV
shell: bash
# Deploy model to HANA
- name: Create HDI Container
shell: bash
run: cf create-service hana hdi-shared cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA
- run: cd test/incidents-app/ && cds deploy --to hana:cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA
run: cf create-service hana hdi-shared cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-${{ matrix.cds-version }}
- run: cd test/incidents-app/ && cds deploy --to hana:cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-${{ matrix.cds-version }}
shell: bash
# Bind against BTP services
- run: cds bind db -2 cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA -o package.json
- run: cds bind db -2 cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-${{ matrix.cds-version }} -o package.json
shell: bash
- run: cds bind -2 print-service -o package.json
- run: cds bind print-service -2 print-service -o package.json
shell: bash
# Run tests in hybrid mode
- run: cds bind --exec npm run test
Expand All @@ -80,15 +100,15 @@ runs:
# Cleanup
- name: Delete HDI Container Key
if: ${{ always() }}
run: cf delete-service-key cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-key -f
run: cf delete-service-key cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-${{ matrix.cds-version }} cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-${{ matrix.cds-version }}-key -f
shell: bash
# Somehow first delete always fails with a "ongoing operation on service binding" error
- name: Delete HDI Container
if: ${{ always() }}
shell: bash
run: |
for i in {1..3}; do
cf delete-service cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA -f && break
cf delete-service cap-js-print-hana-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-$NODE_VERSION_HANA-${{ matrix.cds-version }} -f && break
echo "HDI container delete failed, retrying ($i/3)..."
sleep 10
if [ "$i" -eq 3 ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
npm install
npm run lint
cd tests/incidents-app && npm install
cd test/incidents-app && npm install
cd ../..
npm run test

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
cds-version: [latest]
cds-version: [latest, 8]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -31,6 +31,7 @@ jobs:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
cds-version: [latest, 8]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ mta_archives/

# @cap-js/cds-typer
@cds-models

package-lock.json
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = {
testTimeout: 60000,
testTimeout: 120000,
testMatch: ["**/*.test.js"],
forceExit: true,
detectOpenHandles: true,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@
"@sap/xssec": "^3.6.2"
},
"peerDependencies": {
"@sap/cds": ">=9"
"@sap/cds": ">= 8"
},
"devDependencies": {
"@cap-js/cds-test": "^0.2.0",
"@cap-js/sqlite": "^2"
},
"workspaces": [
"test/incidents-app/"
],
"cds": {
"requires": {
"destinations": true,
Expand Down Expand Up @@ -69,8 +72,5 @@
"prettier:check": "npx -y prettier@3 --check .",
"watch-sample": "cd test/incidents-app && cds watch",
"watch-sample:hybrid": "cd test/incidents-app && cds watch --profile hybrid"
},
"workspaces": [
"test/incidents-app/"
]
}
}
3 changes: 2 additions & 1 deletion test/incidents-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@capire/incidents",
"version": "1.0.0",
"dependencies": {
"@cap-js/hana": "*",
"@cap-js/hana": "^2.0.0",
"@cap-js/db-service": "^2.0.0",
"@cap-js/print": "file:../../."
},
"scripts": {
Expand Down