Moved project from Bitbucket to Github
This commit is contained in:
parent
e7e7278577
commit
f05a1ee3dc
3 changed files with 40 additions and 70 deletions
66
.github/workflows/production-ci.yml
vendored
66
.github/workflows/production-ci.yml
vendored
|
|
@ -1,66 +0,0 @@
|
|||
name: SonarCloud Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
|
||||
jobs:
|
||||
do-scan:
|
||||
name: SonarCloud Scan
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests and generate coverage
|
||||
run: npm run coverage
|
||||
continue-on-error: true
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: SonarCloud Scan
|
||||
uses: SonarSource/sonarqube-scan-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.projectKey=xliviux_ydioy
|
||||
-Dsonar.organization=xliviux
|
||||
-Dsonar.projectName=YDIOY
|
||||
-Dsonar.sourceEncoding=UTF-8
|
||||
-Dsonar.sources=src,tests
|
||||
-Dsonar.inclusions=src/**/*.ts,src/**/*.js,src/**/*.vue,src/**/*.css,src/**/*.scss,tests/**/*.spec.ts
|
||||
-Dsonar.exclusions=**/node_modules/**,**/coverage/**,*.config.ts
|
||||
-Dsonar.coverage.exclusions=tests/**,*.config.ts
|
||||
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
|
||||
-Dsonar.testExecutionReportPaths=coverage/sonar-report.xml
|
||||
|
||||
- name: Check SonarCloud Quality Gate
|
||||
uses: sonarsource/sonarqube-quality-gate-action@master
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results
|
||||
path: |
|
||||
coverage/
|
||||
36
.github/workflows/sonar.yml
vendored
Normal file
36
.github/workflows/sonar.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: Sonar
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
pull_request:
|
||||
branches:
|
||||
- production
|
||||
types: [opened, synchronize, reopened]
|
||||
jobs:
|
||||
sonarqube:
|
||||
name: SonarQube
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup node environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: "npm"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run tests and generate coverage
|
||||
run: npm run coverage
|
||||
continue-on-error: true
|
||||
env:
|
||||
CI: true
|
||||
- name: SonarQube Scan
|
||||
uses: SonarSource/sonarqube-scan-action@v6
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue