Recommend to not use this action for analysis of Dart code #127
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: QA | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
argsInputTest: | |
name: > | |
'args' input | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action with args | |
uses: ./ | |
with: | |
args: -Dsonar.someArg=aValue -Dsonar.scanner.internal.dumpToFile=./output.properties | |
env: | |
SONAR_TOKEN: FAKE_TOKEN | |
- name: Assert | |
run: | | |
./test/assertFileContains ./output.properties "sonar.someArg=aValue" | |
projectBaseDirInputTest: | |
name: > | |
'projectBaseDir' input | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
mkdir -p ./baseDir | |
- name: Run action with projectBaseDir | |
uses: ./ | |
with: | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
projectBaseDir: ./baseDir | |
env: | |
SONAR_TOKEN: FAKE_TOKEN | |
- name: Assert | |
run: | | |
./test/assertFileContains ./output.properties "sonar.projectBaseDir=.*/baseDir" | |
sonarTokenRequiredTest: | |
name: > | |
'SONAR_TOKEN' env var required | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action without SONAR_TOKEN | |
uses: ./ | |
with: | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
continue-on-error: true | |
- name: Previous should have failed | |
if: ${{ steps.runTest.outcome == 'success'}} | |
run: | | |
echo "Expected previous step to fail" | |
exit 1 | |
dontFailGradleTest: | |
name: > | |
Don't fail on Gradle project | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action on Gradle project | |
id: runTest | |
uses: ./ | |
continue-on-error: true | |
env: | |
SONAR_TOKEN: FAKE_TOKEN | |
with: | |
projectBaseDir: ./test/gradle-project | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
- name: Assert | |
run: | | |
./test/assertFileExists ./output.properties | |
dontFailGradleKotlinTest: | |
name: > | |
Don't fail on Kotlin Gradle project | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action on Kotlin Gradle project | |
id: runTest | |
uses: ./ | |
continue-on-error: true | |
env: | |
SONAR_TOKEN: FAKE_TOKEN | |
with: | |
projectBaseDir: ./test/gradle-project-kotlin | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
- name: Assert | |
run: | | |
./test/assertFileExists ./output.properties | |
dontFailMavenTest: | |
name: > | |
Don't fail on Maven project | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action on Maven project | |
id: runTest | |
uses: ./ | |
continue-on-error: true | |
env: | |
SONAR_TOKEN: FAKE_TOKEN | |
with: | |
projectBaseDir: ./test/maven-project | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
- name: Assert | |
run: | | |
./test/assertFileExists ./output.properties | |
runnerDebugUsedTest: | |
name: > | |
'RUNNER_DEBUG' is used | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action with debug mode | |
uses: ./ | |
with: | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
env: | |
RUNNER_DEBUG: 1 | |
SONAR_TOKEN: FAKE_TOKEN | |
- name: Assert | |
run: | | |
./test/assertFileContains ./output.properties "sonar.verbose=true" | |
overrideSonarcloudUrlTest: | |
name: > | |
'SONARCLOUD_URL' is used | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run action with SONARCLOUD_URL | |
uses: ./ | |
with: | |
args: -Dsonar.scanner.internal.dumpToFile=./output.properties | |
env: | |
SONARCLOUD_URL: mirror.sonarcloud.io | |
SONAR_TOKEN: FAKE_TOKEN | |
- name: Assert | |
run: | | |
./test/assertFileContains ./output.properties "sonar.host.url=mirror.sonarcloud.io" | |
./test/assertFileContains ./output.properties "sonar.scanner.sonarcloudUrl=mirror.sonarcloud.io" |