choco icon indicating copy to clipboard operation
choco copied to clipboard

(#3342) Separate TeamCity Builds: Unit test, Scheduled integration test, QA

Open Windos opened this issue 2 years ago • 1 comments

Description Of Changes

This PR splits the current general TeamCity build which runs unit tests on a version control trigger and unit + integration tests on a schedule into two separate builds:

  • Chocolatey CLI (Built with Unit Tests) ID: Chocolatey
  • Chocolatey CLI (Scheduled Integration Testing) ID: ChocolateySchd

It also introduces an additional build specifically for running Code Analysis and Dependency Checking:

  • Chocolatey CLI (SonarQube) ID: ChocolateyQA

Note: Please advise if these names are appropriate, and recommend alternatives as needed.

Motivation and Context

This change enables TeamCity to accurately track how long each build configuration should take to run and how many tests each should run.

Testing

This has been tested on a non-Production TeamCity instance, the KTS file imported successfully and the three builds ran as expected.

image

Operating Systems Testing

N/A

Change Types Made

N/A? Build change

  • [ ] Bug fix (non-breaking change).
  • [ ] Feature / Enhancement (non-breaking change).
  • [ ] Breaking change (fix or feature that could cause existing functionality to change).
  • [ ] Documentation changes.
  • [ ] PowerShell code changes.

Change Checklist

  • [ ] Requires a change to the documentation.
  • [ ] Documentation has been updated.
  • [ ] Tests to cover my changes, have been added.
  • [ ] All new and existing tests passed?
  • [ ] PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #3342

Windos avatar Oct 12 '23 20:10 Windos

@gep13 - the GitHub Action for this PR is failing on the PSScriptAnalyzer step. I've set running this to false in the KTS file, should I also do so for GHA (I wasn't expecting to see a failure in that environment)?

Windos avatar Jan 22 '24 02:01 Windos

@gep13 - I've cleaned up my commits on the PR and it's ready for review now.

With Chocolatey.Cake.Recipe 0.26.3 everything is now working on TeamCity and with a slight workflow tweak to change the PowerShell shell, the GitHub Action is working too.

Windos avatar Mar 19 '24 02:03 Windos

@Windos thank you for pulling all this together! Looking forward to seeing this in action!

gep13 avatar Mar 21 '24 07:03 gep13