Skip to content

Commit 0bc6e65

Browse files
authored
Merge pull request #29 from mathmelo/feature/fix-sonarcloud-ci
fix: separate build and quality gate ci
2 parents a1e6145 + 67f8bed commit 0bc6e65

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

.github/workflows/ci.yaml renamed to .github/workflows/build.yaml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
1-
name: ci-node-workflow
1+
name: ci-build
22
on:
33
pull_request:
44
branches:
5-
- develop
5+
- main
66
jobs:
7-
sonarcloud:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
with:
12-
fetch-depth: 0
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: 22
16-
- run: npm run test:cov
17-
- name: SonarQube Scan
18-
uses: sonarsource/sonarqube-scan-action@v4.1.0 # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
19-
env:
20-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
21-
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
22-
check-application:
7+
build-docker-hub:
238
runs-on: ubuntu-latest
249
steps:
2510
- uses: actions/checkout@v4

.github/workflows/quality-gate.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: ci-quality-gate
2+
on:
3+
pull_request:
4+
branches:
5+
- develop
6+
- main
7+
jobs:
8+
sonarcloud:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 22
17+
- run: npm run test:cov
18+
- name: SonarQube Scan
19+
uses: sonarsource/sonarqube-scan-action@v4.1.0 # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
20+
env:
21+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
22+
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}

0 commit comments

Comments
 (0)