Реализовал ручной запуск тестов
This commit is contained in:
parent
b76cc99613
commit
31000f7d9b
@ -1,25 +1,17 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)] [string] $teamCityToken,
|
||||
[Parameter(Mandatory=$true)] [string] $giteaToken,
|
||||
[Parameter(Mandatory=$true)] [string] $pullId
|
||||
[Parameter(Mandatory=$true)] [string] $branch,
|
||||
[Parameter] [bool] $web
|
||||
)
|
||||
|
||||
$scriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
# Получим инфо о пулл-реквесте
|
||||
|
||||
$pull = Invoke-RestMethod -Uri https://sc.lers.ru/api/v1/repos/lers/LersUchet/pulls/$pullId -Headers @{Authorization = "token $giteaToken"}
|
||||
|
||||
$branch = $pull.head.ref
|
||||
Write-Output "Starting tests in $branch"
|
||||
|
||||
|
||||
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_FullTests"
|
||||
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_ReleaseBuild"
|
||||
|
||||
$webLabel = $pull.labels | Where-Object { $_.name -eq "comp/Web" }
|
||||
|
||||
if ($webLabel)
|
||||
if ($web)
|
||||
{
|
||||
Write-Host "Running web tests"
|
||||
& $scriptDir/Run-TeamCityBuild.ps1 -token $teamCityToken -branch $branch -buildId "LU_Tests_WebTests"
|
||||
|
10
action.yml
10
action.yml
@ -5,11 +5,11 @@ inputs:
|
||||
teamcity-token:
|
||||
description: 'Teamcity token'
|
||||
required: true
|
||||
gitea-token:
|
||||
description: 'Gitea token token'
|
||||
branch:
|
||||
description: 'Branch'
|
||||
required: true
|
||||
pull-id:
|
||||
description: 'Pull request id'
|
||||
web:
|
||||
description: 'Run web'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
@ -17,4 +17,4 @@ runs:
|
||||
steps:
|
||||
- name: Start Teamcity tests
|
||||
shell: powershell
|
||||
run: ${{ gitea.action_path }}/Handle-PullRequestComment.ps1 -teamCityToken ${{ inputs.teamcity-token }} -giteaToken ${{ inputs.gitea-token }} -pullId ${{ inputs.pull-id }}
|
||||
run: ${{ gitea.action_path }}/Handle-PullRequestComment.ps1 -teamCityToken ${{ inputs.teamcity-token }} -branch ${{ inputs.branch }} -web ${{ inputs.web }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user