Skip to content

Commit ea00f26

Browse files
committed
Merge branch 'main' into dynamic-constraints
2 parents 9253f92 + c65b20d commit ea00f26

File tree

19 files changed

+115
-124
lines changed

19 files changed

+115
-124
lines changed

.github/actions/cf-github-deploy/action.yaml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: npm
5+
directory: /
6+
versioning-strategy: increase-if-necessary
7+
schedule:
8+
interval: weekly
9+
groups:
10+
production-dependencies:
11+
dependency-type: "production"
12+
development-dependencies:
13+
dependency-type: "development"
14+
ignore:
15+
- dependency-name: "chai"
16+
# chai 5 doesn't work atm w/ cds.test, TODO fix that in cds.test
17+
versions: ["5.x"]
18+
- dependency-name: "chai-as-promised"
19+
# chai-as-promised 8 doesn't work atm w/ cds.test, TODO fix that in cds.test
20+
versions: ["8.x"]
21+
- dependency-name: "express"
22+
# express 5 not supported atm
23+
versions: ["5.x"]

.github/workflows/cf.yaml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,19 @@ name: Cloud Foundry
33
on:
44
workflow_call:
55
inputs:
6-
cf-api:
7-
description: 'Cloud Foundry API endpoint'
8-
required: false
9-
type: string
10-
cf-org:
11-
description: 'Cloud Foundry organization'
12-
required: false
13-
type: string
14-
cf-space:
15-
description: 'Cloud Foundry space'
16-
required: false
17-
type: string
186
environment:
19-
description: 'Deployment environment name'
20-
required: true
7+
default: Staging
218
type: string
229

2310
workflow_dispatch:
2411
push:
2512
branches:
2613
- main
2714

15+
permissions:
16+
contents: read
17+
deployments: write
18+
2819
concurrency:
2920
group: cf-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
3021
cancel-in-progress: true
@@ -36,27 +27,22 @@ jobs:
3627
deploy:
3728
runs-on: ubuntu-latest
3829
steps:
39-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v5
4031
with:
4132
submodules: true
42-
- uses: actions/setup-node@v4
33+
- uses: actions/setup-node@v5
4334
with:
4435
node-version: 22
4536
- uses: ./.github/actions/cf-setup
4637
with:
47-
cf-api: ${{ inputs.cf-api || vars.CF_API }}
48-
cf-org: ${{ inputs.cf-org || vars.CF_ORG }}
49-
cf-space: ${{ inputs.cf-space || vars.CF_SPACE }}
38+
cf-api: ${{ vars.CF_API }}
39+
cf-org: ${{ vars.CF_ORG }}
40+
cf-space: ${{ vars.CF_SPACE }}
5041
cf-username: ${{ vars.CF_USERNAME }}
5142
cf-password: ${{ secrets.CF_PASSWORD }}
5243
- run: npm clean-install
5344
- run: npx cds up
5445

55-
- uses: ./.github/actions/cf-github-deploy
56-
with:
57-
app-name: ${{ env.APP_NAME }}
58-
environment: ${{ inputs.environment || 'Staging' }}
59-
6046
- run: cf logs ${{ env.APP_NAME }} --recent
6147
if: always()
6248
- run: cf logs orders-srv --recent
@@ -67,3 +53,13 @@ jobs:
6753
if: always()
6854
- run: cf logs ${{ env.APP_NAME }}-db-deployer --recent
6955
if: always()
56+
57+
- name: Get application URL
58+
id: route
59+
shell: bash
60+
run: |
61+
host=$(cf app "${APP_NAME}" | awk '/routes:/ {print $2}' | sed -E 's#^https?://##; s/,.*$//')
62+
echo "url=https://$host" >> "$GITHUB_OUTPUT"
63+
environment:
64+
name: ${{ inputs.environment || 'Staging' }}
65+
url: ${{ steps.route.outputs.url }}

.github/workflows/release.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
release:
66
types: [published]
77

8+
permissions:
9+
contents: read
10+
deployments: write
11+
812
jobs:
913
tests:
1014
uses: capire/samples/.github/workflows/test.yaml@main
@@ -15,7 +19,4 @@ jobs:
1519
uses: capire/samples/.github/workflows/cf.yaml@main
1620
secrets: inherit
1721
with:
18-
cf-api: ${{ vars.CF_API_PRODUCTION }}
19-
cf-org: ${{ vars.CF_ORG_PRODUCTION }}
20-
cf-space: ${{ vars.CF_SPACE_PRODUCTION }}
2122
environment: Production

.github/workflows/test.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ on:
99
branches:
1010
- main
1111

12+
permissions:
13+
contents: read
1214
jobs:
1315
tests:
1416
runs-on: ubuntu-latest
1517
strategy:
1618
matrix:
1719
node-version: [20, 22]
1820
steps:
19-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2022
with:
2123
submodules: true
22-
- uses: actions/setup-node@v4
24+
- uses: actions/setup-node@v5
2325
with:
2426
node-version: ${{ matrix.node-version }}
2527
- run: npm ci

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@
1111

1212
**/@types
1313
**/@cds-models
14+
15+
# local nesting of projects
16+
/xflights
17+
/xtravels

.vscode/launch.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
8-
"name": "bookshop",
9-
"command": "npx cds watch bookshop",
10-
"type": "node-terminal",
5+
"name": "vscode-jest-tests.v2",
116
"request": "launch",
7+
"type": "node", "runtimeExecutable": "jest",
8+
"experimentalNetworking": "off",
9+
"args": [
10+
"${relativeFile}",
11+
"-i", "--test-timeout", "1e6",
12+
"-t", "${jest.testNamePattern}",
13+
],
1214
"skipFiles": [
1315
"<node_internals>/**",
1416
"**/node_modules/**",
15-
]
17+
"**/express/**",
18+
"**/jasmine/**",
19+
"**/jest/**",
20+
"**/cds/lib/req/cds-context.js",
21+
],
1622
},
1723
]
1824
}

bookstore

common

Submodule common updated 1 file

0 commit comments

Comments
 (0)