123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- // Jest Snapshot v1, https://goo.gl/fbAQLP
-
- exports[`should render correctly 1`] = `
- <Fragment>
- <li
- className="abs-width-600"
- >
- <FormattedMessage
- defaultMessage="onboarding.tutorial.with.yaml.gradle"
- id="onboarding.tutorial.with.yaml.gradle"
- values={
- Object {
- "gradle": <React.Fragment>
- <code
- className="rule"
- >
- build.gradle
- </code>
- <ClipboardIconButton
- copyValue="build.gradle"
- />
- </React.Fragment>,
- "sq": <code
- className="rule"
- >
- org.sonarqube
- </code>,
- }
- }
- />
- <CodeSnippet
- snippet="plugins {
- id \\"org.sonarqube\\" version \\"3.5.0.2730\\"
- }
-
- sonar {
- properties {
- property \\"sonar.projectKey\\", \\"my-project\\"
- }
- }"
- />
- </li>
- <CreateYmlFile
- yamlFileName=".github/workflows/build.yml"
- yamlTemplate="name: Build
-
- on:
- push:
- branches:
- - main
- pull_request:
- types: [opened, synchronize, reopened]
-
- jobs:
- build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- java-version: 11
- - name: Cache SonarQube packages
- uses: actions/cache@v1
- with:
- path: ~/.sonar/cache
- key: \${{ runner.os }}-sonar
- restore-keys: \${{ runner.os }}-sonar
- - name: Cache Gradle packages
- uses: actions/cache@v1
- with:
- path: ~/.gradle/caches
- key: \${{ runner.os }}-gradle-\${{ hashFiles('**/*.gradle') }}
- restore-keys: \${{ runner.os }}-gradle
- - name: Build and analyze
- env:
- GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
- SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
- SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
- run: ./gradlew build sonarqube --info"
- />
- <FinishButton
- onClick={[MockFunction]}
- />
- </Fragment>
- `;
-
- exports[`should render correctly: without branch enabled 1`] = `
- <Fragment>
- <li
- className="abs-width-600"
- >
- <FormattedMessage
- defaultMessage="onboarding.tutorial.with.yaml.gradle"
- id="onboarding.tutorial.with.yaml.gradle"
- values={
- Object {
- "gradle": <React.Fragment>
- <code
- className="rule"
- >
- build.gradle
- </code>
- <ClipboardIconButton
- copyValue="build.gradle"
- />
- </React.Fragment>,
- "sq": <code
- className="rule"
- >
- org.sonarqube
- </code>,
- }
- }
- />
- <CodeSnippet
- snippet="plugins {
- id \\"org.sonarqube\\" version \\"3.5.0.2730\\"
- }
-
- sonar {
- properties {
- property \\"sonar.projectKey\\", \\"my-project\\"
- }
- }"
- />
- </li>
- <CreateYmlFile
- yamlFileName=".github/workflows/build.yml"
- yamlTemplate="name: Build
-
- on:
- push:
- branches:
- - main
-
-
- jobs:
- build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - name: Set up JDK 11
- uses: actions/setup-java@v1
- with:
- java-version: 11
- - name: Cache SonarQube packages
- uses: actions/cache@v1
- with:
- path: ~/.sonar/cache
- key: \${{ runner.os }}-sonar
- restore-keys: \${{ runner.os }}-sonar
- - name: Cache Gradle packages
- uses: actions/cache@v1
- with:
- path: ~/.gradle/caches
- key: \${{ runner.os }}-gradle-\${{ hashFiles('**/*.gradle') }}
- restore-keys: \${{ runner.os }}-gradle
- - name: Build and analyze
- env:
- GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
- SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }}
- SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}
- run: ./gradlew build sonarqube --info"
- />
- <FinishButton
- onClick={[MockFunction]}
- />
- </Fragment>
- `;
|