Skip to content

Commit

Permalink
Test release
Browse files Browse the repository at this point in the history
  • Loading branch information
jviau committed Jun 28, 2024
1 parent 7d035c3 commit a2c7178
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 40 deletions.
25 changes: 21 additions & 4 deletions eng/ci/templates/jobs/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,32 @@ jobs:
- job: RunUnitTests
displayName: Run Unit Tests

variables:
- name: test_projects
value: '**\WebJobs.Script.Tests.csproj'

steps:
- template: /eng/ci/templates/install-dotnet.yml@self

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: custom
custom: restore
arguments: -v m
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: -v m -c release --no-restore
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Unit Tests
inputs:
command: test
testRunTitle: Unit Tests
arguments: -v n
projects: |
**\WebJobs.Script.Scaling.Tests.csproj
**\WebJobs.Script.Tests.csproj
arguments: -v m --no-build -c release
projects: $(test_projects)
72 changes: 41 additions & 31 deletions eng/ci/templates/official/jobs/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ jobs:
os: windows

variables:
IntegrationProject: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
IsReleaseBranch: $[contains(variables['Build.SourceBranch'], 'release/')]
test_projects: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
test_args: -c release --no-build
is_release: $[contains(variables['Build.SourceBranch'], 'release/')]

steps:
- template: /eng/ci/templates/install-dotnet.yml@self
Expand Down Expand Up @@ -79,126 +80,135 @@ jobs:
AzureWebJobsEventHubReceiverSecretMap: $(EventHub)

- task: DotNetCoreCLI@2
displayName: Build Integration.csproj
displayName: Restore
inputs:
command: custom
custom: restore
arguments: -v m
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: $(IntegrationProject)
arguments: -v m -c release --no-restore
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: C# end to end tests
inputs:
command: test
testRunTitle: C# end to end tests
arguments: '--filter "Group=CSharpEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=CSharpEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Node end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Node end to end tests
arguments: '--filter "Group=NodeEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=NodeEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Direct load end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Direct load end to end tests
arguments: '--filter "Group=DirectLoadEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=DirectLoadEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: F# end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: F# end to end tests
arguments: '--filter "Group=FSharpEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=FSharpEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Language worker end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Language worker end to end tests
arguments: '--filter "Group=LanguageWorkerSelectionEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=LanguageWorkerSelectionEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Node script host end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Node script host end to end tests
arguments: '--filter "Group=NodeScriptHostTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=NodeScriptHostTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Raw assembly end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Raw assembly end to end tests
arguments: '--filter "Group=RawAssemblyEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=RawAssemblyEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Samples end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Samples end to end tests
arguments: '--filter "Group=SamplesEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=SamplesEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Drain mode end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Drain mode end to end tests
arguments: '--filter "Group=DrainModeEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=DrainModeEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Standby mode end to end tests Windows
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Standby mode end to end tests Windows
arguments: '--filter "Group=StandbyModeEndToEndTests_Windows" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=StandbyModeEndToEndTests_Windows" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Standby mode end to end tests Linux
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Standby mode end to end tests Linux
arguments: '--filter "Group=StandbyModeEndToEndTests_Linux" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=StandbyModeEndToEndTests_Linux" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Linux container end to end tests Windows
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Linux container end to end tests Windows
arguments: '--filter "Group=ContainerInstanceTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=ContainerInstanceTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Release verification tests
condition: ${{ eq(variables.IsReleaseBranch, true) }}
condition: ${{ eq(variables.is_release, true) }}
inputs:
command: test
testRunTitle: Release verification tests
arguments: '--filter "Group=ReleaseTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=ReleaseTests" $(test_args)'
projects: $(test_projects)

- task: PowerShell@2
condition: always()
Expand Down
19 changes: 14 additions & 5 deletions eng/ci/templates/official/jobs/run-non-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
os: windows

variables:
IntegrationProject: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
test_projects: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj

steps:
- template: /eng/ci/templates/install-dotnet.yml@self
Expand Down Expand Up @@ -50,18 +50,27 @@ jobs:
secretsFilter: '*'

- task: DotNetCoreCLI@2
displayName: Build Integration.csproj
displayName: Restore
inputs:
command: custom
custom: restore
arguments: -v m
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: $(IntegrationProject)
arguments: -v m -c release --no-restore
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Non-E2E integration tests
inputs:
command: test
testRunTitle: Non-E2E integration tests
arguments: '--filter "Category!=E2E"'
projects: $(IntegrationProject)
arguments: '--filter "Category!=E2E" -c release --no-build'
projects: $(test_projects)
env:
AzureWebJobsStorage: $(Storage)
AzureWebJobsSecondaryStorage: $(SecondaryStorage)
Expand Down

0 comments on commit a2c7178

Please sign in to comment.