👷 ci(build): add SonarQube scan to build workflow
- introduce SonarQube scanning step for code quality analysis - update workflow dependencies and execution order 🐛 fix(auth): improve error handling and code formatting - remove unused imports and fix code indentation - enhance error handling with improved catch blocks 💄 style(general): standardize code formatting and style consistency - update various files to ensure consistent code style - adjust indentation and whitespace for readability
This commit is contained in:
parent
0e5303da62
commit
d40a577f47
7 changed files with 95 additions and 62 deletions
|
|
@ -20,9 +20,32 @@ jobs:
|
|||
- name: Run ESLint
|
||||
run: npm run lint
|
||||
|
||||
docker:
|
||||
sonar:
|
||||
needs: lint
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: SonarQube Scan
|
||||
env:
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
docker run --rm \
|
||||
-e SONAR_HOST_URL="$SONAR_HOST_URL" \
|
||||
-e SONAR_TOKEN="$SONAR_TOKEN" \
|
||||
-v "$PWD:/usr/src" \
|
||||
-w /usr/src \
|
||||
sonarsource/sonar-scanner-cli \
|
||||
sonar-scanner \
|
||||
-Dsonar.host.url="$SONAR_HOST_URL" \
|
||||
-Dsonar.login="$SONAR_TOKEN"
|
||||
|
||||
docker:
|
||||
needs: [lint, sonar]
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue