1 // Jest Snapshot v1, https://goo.gl/fbAQLP
3 exports[`should render correctly 1`] = `
30 className="abs-width-600"
33 onboarding.build.other.os
36 label="onboarding.build.other.os"
38 optionLabelKey="onboarding.build.other.os"
51 exports[`should render correctly for linux: branches disabled 1`] = `
78 className="abs-width-600"
81 onboarding.build.other.os
85 label="onboarding.build.other.os"
87 optionLabelKey="onboarding.build.other.os"
96 <GithubCFamilyExampleRepositories
98 className="big-spacer-top"
103 yamlFileName=".github/workflows/build.yml"
104 yamlTemplate="name: Build
115 runs-on: <image ready for your build toolchain>
117 - uses: actions/checkout@v2
119 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
120 - name: Download and install the build wrapper, build the project
123 curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \${{ secrets.SONAR_HOST_URL }}/static/cpp/build-wrapper-linux-x86.zip
124 unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
125 $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>
127 SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
129 - name: Download and install the SonarScanner
131 SONAR_SCANNER_VERSION: 4.6.2.2472
133 curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-\${{ env.SONAR_SCANNER_VERSION }}-linux.zip
134 unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
135 echo "$HOME/.sonar/sonar-scanner-\${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
137 - name: SonarQube analysis
139 sonar-scanner --define sonar.cfamily.build-wrapper-output=bw-output
141 SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
142 SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}"
145 className="abs-width-800"
148 onClick={[MockFunction]}
153 exports[`should render correctly for mac: branches enabled 1`] = `
180 className="abs-width-600"
183 onboarding.build.other.os
187 label="onboarding.build.other.os"
189 optionLabelKey="onboarding.build.other.os"
198 <GithubCFamilyExampleRepositories
200 className="big-spacer-top"
205 yamlFileName=".github/workflows/build.yml"
206 yamlTemplate="name: Build
213 types: [opened, synchronize, reopened]
218 runs-on: <image ready for your build toolchain>
220 - uses: actions/checkout@v2
222 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
223 - name: Download and install the build wrapper
226 curl -sSLo $HOME/.sonar/build-wrapper-macosx-x86.zip \${{ secrets.SONAR_HOST_URL }}/static/cpp/build-wrapper-macosx-x86.zip
227 unzip -o $HOME/.sonar/build-wrapper-macosx-x86.zip -d $HOME/.sonar/
229 SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
231 - name: Download and install the SonarScanner
233 curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-macosx.zip
234 unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
236 - name: Build and analyse the project
238 # Potential improvement : add these paths to the PATH env var.
239 $HOME/.sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output <your clean build command>
240 $HOME/.sonar/sonar-scanner-4.6.2.2472-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output
242 SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
243 SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}"
246 className="abs-width-800"
249 onClick={[MockFunction]}
254 exports[`should render correctly for win: branches enabled 1`] = `
281 className="abs-width-600"
284 onboarding.build.other.os
288 label="onboarding.build.other.os"
290 optionLabelKey="onboarding.build.other.os"
299 <GithubCFamilyExampleRepositories
301 className="big-spacer-top"
306 yamlFileName=".github/workflows/build.yml"
307 yamlTemplate="name: Build
314 types: [opened, synchronize, reopened]
319 runs-on: <image ready for your build toolchain>
321 - uses: actions/checkout@v2
323 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
324 - name: Download and install the build wrapper
327 $path = "$HOME/.sonar/build-wrapper-win-x86.zip"
329 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
330 (New-Object System.Net.WebClient).DownloadFile("\${{ secrets.SONAR_HOST_URL }}/static/cpp/build-wrapper-win-x86.zip", $path)
331 Add-Type -AssemblyName System.IO.Compression.FileSystem
332 [System.IO.Compression.ZipFile]::ExtractToDirectory($path, "$HOME/.sonar")
334 SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
336 - name: Download and install the SonarScanner
339 $path = "$HOME/.sonar/sonar-scanner-cli-4.6.2.2472-windows.zip"
340 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
341 (New-Object System.Net.WebClient).DownloadFile("https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-windows.zip", $path)
342 Add-Type -AssemblyName System.IO.Compression.FileSystem
343 [System.IO.Compression.ZipFile]::ExtractToDirectory($path, "$HOME/.sonar")
345 - name: Build and analyse the project
348 $env:Path += ";$HOME/.sonar/build-wrapper-win-x86;$HOME/.sonar/sonar-scanner-4.6.2.2472-windows/bin"
349 build-wrapper-win-x86-64 --out-dir bw-output <your clean build command>
350 sonar-scanner.bat "-Dsonar.cfamily.build-wrapper-output=bw-output"
352 SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
353 SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}"
356 className="abs-width-800"
359 onClick={[MockFunction]}