Skip to content

Commit bbe9635

Browse files
authored
Add sample and git workflows
Improve template
2 parents 2fdd1cf + 4df4dcc commit bbe9635

65 files changed

Lines changed: 8629 additions & 209 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

8 KB
Binary file not shown.

.cdsprettier.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"maxDocCommentLine": 80,
3+
"formatDocComments": true,
4+
"tabSize": 2,
5+
"alignPostAnnotations": false,
6+
"alignColonsInAnnotations": false,
7+
"alignValuesInAnnotations": false
8+
}

.cdsrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[Version: ] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
[ ] is it a regression issue?
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Customer Info**
24+
Company: xyz.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.
20+
21+
**Have you already checked existing issues before creating a feature request?**
22+
If you find same feature requests reported, upvote the issue (+1)
23+
24+
**Customer Info**
25+
Company: xyz

.github/actions/build/action.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 'Build Plugin and Sample'
2+
description: 'Builds emoji plugin, installs it, builds incident app, validates integration tests syntax'
3+
inputs:
4+
java-version:
5+
description: 'Java version to use'
6+
required: false
7+
default: '21'
8+
node-version:
9+
description: 'Node.js version to use'
10+
required: false
11+
default: '22'
12+
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- name: Set up Java
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: ${{ inputs.java-version }}
21+
cache: maven
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ inputs.node-version }}
27+
cache: 'npm'
28+
29+
- name: Build and Install Emoji Plugin
30+
shell: bash
31+
run: |
32+
mvn clean install -DskipTests=true -B -V
33+
34+
- name: Build Incident App (with test compilation)
35+
shell: bash
36+
working-directory: tests/incident-app
37+
run: |
38+
mvn clean compile test-compile -B -V
39+
40+
- name: Validate Integration Tests Syntax
41+
shell: bash
42+
working-directory: tests/integration-tests
43+
run: |
44+
mvn compile test-compile -DskipTests=true -B -V

.github/actions/test/action.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 'Test Plugin and Sample'
2+
description: 'Tests emoji plugin, bookshop, and integration tests'
3+
inputs:
4+
java-version:
5+
description: 'Java version to use'
6+
required: false
7+
default: '21'
8+
node-version:
9+
description: 'Node.js version to use'
10+
required: false
11+
default: '22'
12+
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- name: Set up Java
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: ${{ inputs.java-version }}
21+
cache: maven
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ inputs.node-version }}
27+
cache: 'npm'
28+
29+
- name: Build, Install and Test Emoji Plugin
30+
shell: bash
31+
run: |
32+
mvn clean install -B -V
33+
34+
- name: Test Bookshop App (Integration Tests)
35+
shell: bash
36+
working-directory: samples/bookshop
37+
run: |
38+
mvn test -B -V

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directories:
5+
- "/"
6+
- "/tests/bookshop"
7+
schedule:
8+
interval: daily
9+
open-pull-requests-limit: 10
10+
ignore:
11+
- dependency-name: com.sap.cds:*
12+
versions:
13+
- ">=4"
14+
15+
- package-ecosystem: npm
16+
directories:
17+
- "/"
18+
- "/tests/bookshop"
19+
schedule:
20+
interval: daily
21+
open-pull-requests-limit: 10
22+
23+
- package-ecosystem: github-actions
24+
directory: "/"
25+
schedule:
26+
interval: daily
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check Changelog
2+
on:
3+
pull_request:
4+
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
5+
branches:
6+
- main
7+
jobs:
8+
Check-Changelog:
9+
name: Check Changelog Action
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: tarides/changelog-check-action@v3
13+
with:
14+
changelog: CHANGELOG.md

.github/workflows/issue.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Label issues
2+
3+
permissions:
4+
issues: write
5+
6+
on:
7+
issues:
8+
types:
9+
- opened
10+
11+
jobs:
12+
label_issues:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- run: gh issue edit "$NUMBER" --add-label "$LABELS"
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
NUMBER: ${{ github.event.issue.number }}
20+
LABELS: New
21+
22+
- uses: actions/github-script@v8
23+
with:
24+
script: |
25+
github.rest.issues.createComment({
26+
issue_number: context.issue.number,
27+
owner: context.repo.owner,
28+
repo: context.repo.repo,
29+
body: `👋 Hello @${{github.event.issue.user.login}}, thank you for submitting this issue. Our team is reviewing your report and will follow up with you as soon as possible.`
30+
})

0 commit comments

Comments
 (0)