Merge pull request #760 from splitio/remove_unload_event_handler #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sonar-scan | |
on: | |
pull_request: | |
branches: | |
- master | |
- development | |
push: | |
branches: | |
- master | |
- development | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up nodejs | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
cache: 'npm' | |
- name: npm CI | |
run: npm ci | |
- name: npm Check | |
run: npm run check | |
- name: npm Build | |
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build | |
- name: SonarQube Scan (Push) | |
if: github.event_name == 'push' | |
uses: SonarSource/[email protected] | |
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 }}" | |
- name: SonarQube Scan (Pull Request) | |
if: github.event_name == 'pull_request' | |
uses: SonarSource/[email protected] | |
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.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 }} |