Skip to content

Update comment

Update comment #280

Workflow file for this run

name: ci
on:
pull_request:
branches:
- master
pull_request_target:
branches:
- development
push:
branches:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up nodejs
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
- name: npm CI
run: npm ci
- name: npm Check
run: npm run check
- name: npm Test
run: npm run test -- --coverage
- name: npm Build
run: npm run build
- name: Set VERSION env
run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: SonarQube Scan (Push)
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development')
uses: SonarSource/[email protected]
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
-Dsonar.projectVersion=${{ env.VERSION }}
-Dsonar.branch.name=${{ github.ref_name }}
- name: SonarQube Scan (Pull Request)
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: SonarSource/[email protected]
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
-Dsonar.projectVersion=${{ env.VERSION }}
-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 }}