Skip to content

Commit 6c2c920

Browse files
authored
Replace old pipeline by git actions checks (#125)
* Replace old pipeline by git actions checks * Update sonar properties
1 parent 385580c commit 6c2c920

6 files changed

Lines changed: 61 additions & 87 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
cache: 'npm'
19+
20+
- run: npm ci
21+
22+
- name: Unit tests
23+
run: npm test
24+
25+
- uses: actions/upload-artifact@v4
26+
with:
27+
name: unit-coverage
28+
path: coverage/unit
29+
if-no-files-found: warn

.github/workflows/sonar.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Sonar
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
sonar:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
cache: 'npm'
21+
22+
- run: npm ci
23+
24+
- name: Unit tests
25+
run: npm test
26+
27+
- name: SonarQube scan
28+
uses: SonarSource/sonarqube-scan-action@v5
29+
env:
30+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
31+
SONAR_HOST_URL: https://sonar.tools.sap

.pipeline/config.yml

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

.pipeline/extensions/Central Build.groovy

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

Jenkinsfile

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

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.host.url=https://sonar.tools.sap
22

3-
sonar.projectKey=sap-customer-data-cloud-accelerator
3+
sonar.projectKey=sap-customer-data-cloud-accelerator-sap-customer-data-cloud-accelerator-4978c
44
sonar.projectName=sap-customer-data-cloud-accelerator
55

66
sonar.sources=cdc-accelerator

0 commit comments

Comments
 (0)