mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 06:00:12 +02:00
added ci
This commit is contained in:
parent
3f39f16fd7
commit
a414a6ad69
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@ -1,33 +1,28 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
sonarqube:
|
||||
sonarqube-analysis:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '20.17.0'
|
||||
node-version: '16'
|
||||
|
||||
- name: Set up Java 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run SonarCloud scan
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Clé secrète SonarCloud
|
||||
- name: Run SonarQube scan
|
||||
run: |
|
||||
npx sonar-scanner \
|
||||
-Dsonar.projectKey=your_project_key \
|
||||
-Dsonar.organization=your_organization_key \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=https://sonarcloud.io \
|
||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
||||
-Dsonar.projectKey=your_project_key \
|
||||
-Dsonar.sources=. \
|
||||
-Dsonar.host.url=http://localhost:9000 \
|
||||
-Dsonar.login=admin \
|
||||
-Dsonar.password=admin
|
||||
|
Loading…
x
Reference in New Issue
Block a user