Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
slawa4s authored Jun 14, 2022
1 parent 267f583 commit a95da67
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,20 @@ on:
test_push_info:
description: 'Do tests need to be pushed'
default: 'true'
required: false
required: true
test_delete_info:
description: 'Do old tests need to be deleted'
default: 'false'
required: false
required: true

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v2


- run: echo "with"
if: github.event.inputs.test_push_info == 'true'
shell: sh

- run: echo "without"
if: github.event.inputs.test_push_info
shell: sh

- name: Delete old tests
if: github.event.inputs.test_delete_info == 'true'
if: ${{ inputs.test_delete_info == 'true' }}
uses: EndBug/add-and-commit@v9
with:
remove: 'tests'
Expand All @@ -56,8 +47,16 @@ runs:
$RUN_SYSTEM_SCRIPT_PATH "cli" $UTBOT_CLI_OPTIONS
shell: sh

- run: echo "if delete works!"
shell: bash
if: ${{ inputs.test_delete_info == 'false' }}

- run: echo ${{ inputs.test_delete_info }}
shell: bash

- name: Create Pull Request with tests and codeAnalysis information
uses: peter-evans/create-pull-request@v4
if: ${{ inputs.test_push_info == 'true' }}
with:
add-paths: |
tests/
Expand All @@ -69,6 +68,19 @@ runs:
body: UTBot code analysis add tests and codeAnalysis information
delete-branch: true

- name: Create Pull Request with tests and codeAnalysis information
uses: peter-evans/create-pull-request@v4
if: ${{ inputs.test_push_info != 'true' }}
with:
add-paths: |
codeAnalysis/
commit-message: UTBot code analysis add tests and codeAnalysis information
branch-suffix: timestamp
branch: utbote-code-analysis
title: UTBot code analysis
body: UTBot code analysis add tests and codeAnalysis information
delete-branch: true

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
with:
Expand Down

0 comments on commit a95da67

Please sign in to comment.