Skip to content

Commit

Permalink
Sonar - backend tests through maven
Browse files Browse the repository at this point in the history
  • Loading branch information
lwih committed Jan 3, 2024
1 parent f174f92 commit 9cdf433
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:

- name: Build and analyze with SonarCloud
run: |
cd backend && ./mvnw clean install sonar:sonar \
make back-check-sonar \
-Dsonar.projectKey=MTES-MCT_rapportnav2 \
-Dsonar.organization=mtes-mct \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
sonarcloudScan-frontend:
name: SonarCloudScanFrontend
Expand Down
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,19 @@ BACKEND_DIR := backend
BACKEND_CONFIGURATION_FOLDER=$(shell pwd)/infra/configurations/backend/


.PHONY: back-clean-install back-check-dependencies back-test back-verify-ci
.PHONY: back-clean-install back-check-dependencies back-test back-check-sonar
back-clean-install:
cd $(BACKEND_DIR) && ./mvnw clean install

back-check-dependencies:
cd $(BACKEND_DIR) && ./mvnw dependency-check:check

back-check-sonar:
cd $(BACKEND_DIR) && ./mvnw clean install sonar:sonar

back-test:
cd $(BACKEND_DIR) && ./mvnw test -Pci -Dmaven.main.skip=true

back-verify-ci:
cd $(BACKEND_DIR) && ./mvnw clean verify -Pci





.PHONY: check-clean-archi back-start-dev back-build-mvn

Expand Down

0 comments on commit 9cdf433

Please sign in to comment.