8
8
types : [opened, synchronize, reopened]
9
9
10
10
jobs :
11
+ noInputsTest :
12
+ name : >
13
+ No inputs
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ with :
18
+ token : ${{ secrets.GITHUB_TOKEN }}
19
+ - name : Run action with args
20
+ uses : ./
21
+ env :
22
+ SONAR_HOST_URL : http://not_actually_used
23
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
24
+ - name : Assert
25
+ run : |
26
+ ./test/assertFileContains ./output.properties "sonar.projectBaseDir=."
11
27
argsInputTest :
12
28
name : >
13
29
'args' input
19
35
- name : Run action with args
20
36
uses : ./
21
37
with :
22
- args : -Dsonar.someArg=aValue -Dsonar.scanner.dumpToFile=./output.properties
38
+ args : -Dsonar.someArg=aValue
23
39
env :
24
40
SONAR_HOST_URL : http://not_actually_used
41
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
25
42
- name : Assert
26
43
run : |
27
44
./test/assertFileContains ./output.properties "sonar.someArg=aValue"
@@ -37,10 +54,10 @@ jobs:
37
54
- name : Run action with projectBaseDir
38
55
uses : ./
39
56
with :
40
- args : -Dsonar.scanner.dumpToFile=./output.properties
41
57
projectBaseDir : ./baseDir
42
58
env :
43
59
SONAR_HOST_URL : http://not_actually_used
60
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
44
61
- name : Assert
45
62
run : |
46
63
./test/assertFileContains ./output.properties "sonar.projectBaseDir=.*/baseDir"
58
75
continue-on-error : true
59
76
env :
60
77
SONAR_HOST_URL : http://not_actually_used
78
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
61
79
with :
62
80
projectBaseDir : ./test/gradle-project
63
- args : -Dsonar.scanner.dumpToFile=./output.properties
64
81
- name : Assert
65
82
run : |
66
83
./test/assertFileExists ./output.properties
78
95
continue-on-error : true
79
96
env :
80
97
SONAR_HOST_URL : http://not_actually_used
98
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
81
99
with :
82
100
projectBaseDir : ./test/gradle-project
83
- args : -Dsonar.scanner.dumpToFile=./output.properties
84
101
- name : Assert
85
102
run : |
86
103
./test/assertFileExists ./output.properties
98
115
continue-on-error : true
99
116
env :
100
117
SONAR_HOST_URL : http://not_actually_used
118
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
101
119
with :
102
120
projectBaseDir : ./test/maven-project
103
- args : -Dsonar.scanner.dumpToFile=./output.properties
104
121
- name : Assert
105
122
run : |
106
123
./test/assertFileExists ./output.properties
@@ -145,11 +162,10 @@ jobs:
145
162
token : ${{ secrets.GITHUB_TOKEN }}
146
163
- name : Run action with debug mode
147
164
uses : ./
148
- with :
149
- args : -Dsonar.scanner.dumpToFile=./output.properties
150
165
env :
151
166
RUNNER_DEBUG : 1
152
167
SONAR_HOST_URL : http://not_actually_used
168
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
153
169
- name : Assert
154
170
run : |
155
171
./test/assertFileContains ./output.properties "sonar.verbose=true"
@@ -190,3 +206,53 @@ jobs:
190
206
- name : Assert
191
207
run : |
192
208
./test/assertFileExists ./test/example-project/.scannerwork/report-task.txt
209
+ useSslCertificate :
210
+ name : >
211
+ 'SONAR_ROOT_CERT' is converted to truststore
212
+ runs-on : ubuntu-latest
213
+ steps :
214
+ - uses : actions/checkout@v4
215
+ with :
216
+ token : ${{ secrets.GITHUB_TOKEN }}
217
+ - name : Run action with SSL certificate
218
+ uses : ./
219
+ env :
220
+ SONAR_ROOT_CERT : |
221
+ -----BEGIN CERTIFICATE-----
222
+ MIIFtjCCA56gAwIBAgIULroxFuPWyNOiQtAVPS/XFFMXp6owDQYJKoZIhvcNAQEL
223
+ BQAwXDELMAk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UKjPypKfPEC
239
+ AwEAAaNwMG4wHwYDVR0jBBgwFoAUINXfg3fn6/RUenW3EobpMoP8wDQwCQYDVR0T
240
+ BAIwADALBgNVHQ8EBAMCBPAwFAYDVR0RBA0wC4IJbG9jYWxob3N0MB0GA1UdDgQW
241
+ BBRX4bsny+8GQcFpM10jtAfFxzNxzzANBgkqhkiG9w0BAQsFAAOCAgEAa+Myw6li
242
+ Fme95cPpINTite/9LXk+TlHHnXiV5Z+Um3NTLSllX3zPuRFiOE71OKFrWQPqH2N/
243
+ 85l6h19G9xQsaqkkVFyQENkNzykZpJL/jU4+wgRtwcEDkaRGGURZacz3vfLTc1HX
244
+ tPDNv/JsZ5HE2d7cF5YhN4UahtxS2lvarrSujaOBpFZTT6PbEYX9EnwCdapORHOh
245
+ wKMc3OGGOiGWvRlVaWu/Huq2HvXXcK0pmaYWWKX3u21evthSYOu9U4Rk0z1y7m3/
246
+ CIYaIrvSbkzq2KKXMn7lr26bv2cthAQrPAjb2ILPUoyzKa3wEK3lkhanM6PN9CMH
247
+ y5KRTpqwV45Qr6BAVY1bP67pEkay2T31chIVKds6dkx9b2/bWpW9PWuymsbWX2vO
248
+ Q1MiaPkXKSTgCRwQUR0SNbPHw3X+VhrKKJB+beX8Bh2fcKw3jGGM8oHiA1hpdnbg
249
+ Y5fW7EupF5gabf2jNB1XJ4gowlpB3nTooKFgbcgsvi68MRdBno2TWUhsZ3zCVyaH
250
+ KFdDV0f78Fg7oL79K3kBL/iqr+jsb8sFHKIS4Dyyz2rDJrE0q0xAPes+Bu75R3/5
251
+ M/s2H7KuLqLdDYsCsMeMqOVuIcAyPp2MFWInYPyi0zY4fwKwm8f/Kv8Lzb+moxqI
252
+ Fct6d1S08JAosVnZcP2P7Yz+TbmDRtsqCgk=
253
+ -----END CERTIFICATE-----
254
+ SONAR_HOST_URL : http://not_actually_used
255
+ SONAR_SCANNER_JSON_PARAMS : ' {"sonar.scanner.internal.dumpToFile": "./output.properties"}'
256
+ - name : Assert
257
+ run : |
258
+ ./test/assertFileContains ./output.properties "sonar.scanner.truststorePassword=changeit"
0 commit comments