Skip to content

Commit

Permalink
Update to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Jun 16, 2024
1 parent 3552f24 commit f2b303c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/platform.ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
required: false
default: '.*'
push:
branches:
- main
# branches:
# - main
paths:
- ".github/workflows/platform.ci-tests.yml"
- "avm/utilities/**"
Expand Down Expand Up @@ -68,8 +68,9 @@ jobs:
. (Join-Path $env:GITHUB_WORKSPACE 'avm' 'utilities' 'tests' 'Test-CI.ps1')
$functionInput = @{
RepoRootPath = $env:GITHUB_WORKSPACE
BranchName = $env:GITHUB_REF
RepoRootPath = $env:GITHUB_WORKSPACE
BranchName = $env:GITHUB_REF
\ GitHubRepository = $env:GITHUB_REPOSITORY
TestFileRegex = '${{ (fromJson(needs.job_initialize_pipeline.outputs.workflowInput)).testFileRegex }}'
}

Expand Down
9 changes: 8 additions & 1 deletion avm/utilities/tests/Test-CI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Optional. The root of the repository. Used to correctly resolve paths.
.PARAMETER BranchName
Optional. The branch to test for.
.PARAMETER GitHubRepository
Optional. The repository containing the test file. If provided it will be used to generate a URL to the exact line of the test.
For example: 'Azure/ResourceModules'
.PARAMETER TestFileRegex
Optional. The regex to use when searching for test files
Expand All @@ -38,6 +42,9 @@ function Test-CI {
[Parameter()]
[string] $BranchName = (git branch --show-current),

[Parameter(Mandatory )]
[string] $GitHubRepository,

[Parameter()]
[string] $TestFileRegex = '.*',

Expand Down Expand Up @@ -86,7 +93,7 @@ function Test-CI {
RepoRootPath = $RepoRootPath
PesterTestResults = $testResults
OutputFilePath = Join-Path $RepoRootPath 'avm' 'utilities' 'tests' 'Pester-output.md'
GitHubRepository = $RepoRootPath
GitHubRepository = $GitHubRepository
BranchName = $BranchName
}

Expand Down

0 comments on commit f2b303c

Please sign in to comment.