Skip to content

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- main
- feature/*
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Run tests
run: |
npm ci
npm run test
echo "${{ github.ref_name }}"
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >

Check failure on line 30 in .github/workflows/sonar.yml

View workflow run for this annotation

GitHub Actions / Main Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/sonar.yml (Line: 30, Col: 15): Unexpected symbol: '+'. Located at position 63 within expression: github.event_name != 'pull_request' && '-Dsonar.branch.name=' + github.ref
-Dsonar.organization=retejs
-Dsonar.projectKey=retejs_${{ github.event.repository.name }}
-Dsonar.sources=src/
-Dsonar.test.exclusions=tests/**
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.tests=tests/
${{ github.event_name != 'pull_request' && '-Dsonar.branch.name=' + github.ref }}
-Dsonar.verbose=true