Skip to content

Commit e3126a7

Browse files
authored
Merge pull request #25 from mathmelo/feature/fix-sonarcloud-ci
ci: separate build and quality gates
2 parents ca3511e + 30914a6 commit e3126a7

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

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

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,9 @@
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 }}
227
check-application:
238
runs-on: ubuntu-latest
249
steps:

.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-sonarcloud
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)