(t *testing.T)
| 319 | } |
| 320 | |
| 321 | func TestRun(t *testing.T) { |
| 322 | noInputsYAMLContent := []byte(` |
| 323 | name: minimal workflow |
| 324 | on: workflow_dispatch |
| 325 | jobs: |
| 326 | yell: |
| 327 | runs-on: ubuntu-latest |
| 328 | steps: |
| 329 | - name: do a yell |
| 330 | run: | |
| 331 | echo "AUUUGH!" |
| 332 | `) |
| 333 | encodedNoInputsYAMLContent := base64.StdEncoding.EncodeToString(noInputsYAMLContent) |
| 334 | yamlContent := []byte(` |
| 335 | name: a workflow |
| 336 | on: |
| 337 | workflow_dispatch: |
| 338 | inputs: |
| 339 | greeting: |
| 340 | default: hi |
| 341 | description: a greeting |
| 342 | name: |
| 343 | required: true |
| 344 | description: a name |
| 345 | jobs: |
| 346 | greet: |
| 347 | runs-on: ubuntu-latest |
| 348 | steps: |
| 349 | - name: perform the greet |
| 350 | run: | |
| 351 | echo "${{ github.event.inputs.greeting}}, ${{ github.events.inputs.name }}!"`) |
| 352 | |
| 353 | encodedYAMLContent := base64.StdEncoding.EncodeToString(yamlContent) |
| 354 | |
| 355 | yamlContentChoiceIp := []byte(` |
| 356 | name: choice inputs |
| 357 | on: |
| 358 | workflow_dispatch: |
| 359 | inputs: |
| 360 | name: |
| 361 | type: choice |
| 362 | description: Who to greet |
| 363 | default: monalisa |
| 364 | options: |
| 365 | - monalisa |
| 366 | - cschleiden |
| 367 | favourite-animal: |
| 368 | type: choice |
| 369 | description: What's your favourite animal |
| 370 | required: true |
| 371 | options: |
| 372 | - dog |
| 373 | - cat |
| 374 | jobs: |
| 375 | greet: |
| 376 | runs-on: ubuntu-latest |
| 377 | steps: |
| 378 | - name: Send greeting |
nothing calls this directly
no test coverage detected