mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 14: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:
|
jobs:
|
||||||
sonarqube:
|
sonarqube-analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v2
|
||||||
with:
|
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
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Run SonarCloud scan
|
- name: Run SonarQube scan
|
||||||
env:
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Clé secrète SonarCloud
|
|
||||||
run: |
|
run: |
|
||||||
npx sonar-scanner \
|
npx sonar-scanner \
|
||||||
-Dsonar.projectKey=your_project_key \
|
-Dsonar.projectKey=your_project_key \
|
||||||
-Dsonar.organization=your_organization_key \
|
-Dsonar.sources=. \
|
||||||
-Dsonar.sources=. \
|
-Dsonar.host.url=http://localhost:9000 \
|
||||||
-Dsonar.host.url=https://sonarcloud.io \
|
-Dsonar.login=admin \
|
||||||
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
|
-Dsonar.password=admin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user