Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 46 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.16.0'
cache: 'npm'
Expand All @@ -29,7 +31,48 @@ jobs:
run: npm run check

- name: npm Test
run: npm run test
run: npm run test -- --coverage

- name: npm Build
run: npm run build

- name: SonarQube Scan (Push)
if: github.event_name == 'push'
uses: SonarSource/sonarcloud-github-action@v1.8
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
-Dsonar.projectName=${{ github.event.repository.name }}
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.exclusions=**/*.java
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"

- name: SonarQube Scan (Pull Request)
if: github.event_name == 'pull_request'
uses: SonarSource/sonarcloud-github-action@v1.8
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
-Dsonar.projectName=${{ github.event.repository.name }}
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.exclusions=**/*.java
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}