You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Gradle-test.tsx.snap 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`should render correctly 1`] = `
  3. <Fragment>
  4. <li
  5. className="abs-width-600"
  6. >
  7. <FormattedMessage
  8. defaultMessage="onboarding.tutorial.with.yaml.gradle"
  9. id="onboarding.tutorial.with.yaml.gradle"
  10. values={
  11. Object {
  12. "gradle": <React.Fragment>
  13. <code
  14. className="rule"
  15. >
  16. build.gradle
  17. </code>
  18. <ClipboardIconButton
  19. copyValue="build.gradle"
  20. />
  21. </React.Fragment>,
  22. "sq": <code
  23. className="rule"
  24. >
  25. org.sonarqube
  26. </code>,
  27. }
  28. }
  29. />
  30. <CodeSnippet
  31. snippet="plugins {
  32. id \\"org.sonarqube\\" version \\"3.5.0.2730\\"
  33. }
  34. sonar {
  35. properties {
  36. property \\"sonar.projectKey\\", \\"my-project\\"
  37. }
  38. }"
  39. />
  40. </li>
  41. <CreateYmlFile
  42. yamlFileName=".github/workflows/build.yml"
  43. yamlTemplate="name: Build
  44. on:
  45. push:
  46. branches:
  47. - main
  48. pull_request:
  49. types: [opened, synchronize, reopened]
  50. jobs:
  51. build:
  52. name: Build
  53. runs-on: ubuntu-latest
  54. steps:
  55. - uses: actions/checkout@v2
  56. with:
  57. fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
  58. - name: Set up JDK 11
  59. uses: actions/setup-java@v1
  60. with:
  61. java-version: 11
  62. - name: Cache SonarQube packages
  63. uses: actions/cache@v1
  64. with:
  65. path: ~/.sonar/cache
  66. key: \${{ runner.os }}-sonar
  67. restore-keys: \${{ runner.os }}-sonar
  68. - name: Cache Gradle packages
  69. uses: actions/cache@v1
  70. with:
  71. path: ~/.gradle/caches
  72. key: \${{ runner.os }}-gradle-\${{ hashFiles('**/*.gradle') }}
  73. restore-keys: \${{ runner.os }}-gradle
  74. - name: Build and analyze
  75. env:
  76. GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
  77. SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
  78. SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
  79. run: ./gradlew build sonarqube --info"
  80. />
  81. <FinishButton
  82. onClick={[MockFunction]}
  83. />
  84. </Fragment>
  85. `;
  86. exports[`should render correctly: without branch enabled 1`] = `
  87. <Fragment>
  88. <li
  89. className="abs-width-600"
  90. >
  91. <FormattedMessage
  92. defaultMessage="onboarding.tutorial.with.yaml.gradle"
  93. id="onboarding.tutorial.with.yaml.gradle"
  94. values={
  95. Object {
  96. "gradle": <React.Fragment>
  97. <code
  98. className="rule"
  99. >
  100. build.gradle
  101. </code>
  102. <ClipboardIconButton
  103. copyValue="build.gradle"
  104. />
  105. </React.Fragment>,
  106. "sq": <code
  107. className="rule"
  108. >
  109. org.sonarqube
  110. </code>,
  111. }
  112. }
  113. />
  114. <CodeSnippet
  115. snippet="plugins {
  116. id \\"org.sonarqube\\" version \\"3.5.0.2730\\"
  117. }
  118. sonar {
  119. properties {
  120. property \\"sonar.projectKey\\", \\"my-project\\"
  121. }
  122. }"
  123. />
  124. </li>
  125. <CreateYmlFile
  126. yamlFileName=".github/workflows/build.yml"
  127. yamlTemplate="name: Build
  128. on:
  129. push:
  130. branches:
  131. - main
  132. jobs:
  133. build:
  134. name: Build
  135. runs-on: ubuntu-latest
  136. steps:
  137. - uses: actions/checkout@v2
  138. with:
  139. fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
  140. - name: Set up JDK 11
  141. uses: actions/setup-java@v1
  142. with:
  143. java-version: 11
  144. - name: Cache SonarQube packages
  145. uses: actions/cache@v1
  146. with:
  147. path: ~/.sonar/cache
  148. key: \${{ runner.os }}-sonar
  149. restore-keys: \${{ runner.os }}-sonar
  150. - name: Cache Gradle packages
  151. uses: actions/cache@v1
  152. with:
  153. path: ~/.gradle/caches
  154. key: \${{ runner.os }}-gradle-\${{ hashFiles('**/*.gradle') }}
  155. restore-keys: \${{ runner.os }}-gradle
  156. - name: Build and analyze
  157. env:
  158. GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
  159. SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
  160. SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
  161. run: ./gradlew build sonarqube --info"
  162. />
  163. <FinishButton
  164. onClick={[MockFunction]}
  165. />
  166. </Fragment>
  167. `;