Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

Windos
Copy link
Member

@Windos Windos commented Oct 12, 2023

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 Windos requested a review from gep13 October 12, 2023 20:49
@Windos Windos force-pushed the GH-3342/separate-teamcity-builds branch from 7435faf to 324fdae Compare January 22, 2024 01:56
@Windos
Copy link
Member Author

Windos commented Jan 22, 2024

@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 Windos force-pushed the GH-3342/separate-teamcity-builds branch 2 times, most recently from 9f9d9b5 to aa3ae48 Compare March 12, 2024 09:34
Windos added 2 commits March 19, 2024 15:13
The default shell on Windows runners is pwsh, but running the PSSA
task under pwsh was resulting in an error running `Install-Module`.
This error is not exhibited when running under Windows Powershell.
@Windos Windos force-pushed the GH-3342/separate-teamcity-builds branch from a1b0cca to a0e5728 Compare March 19, 2024 02:21
@Windos
Copy link
Member Author

Windos commented Mar 19, 2024

@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.

Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 3def731 into chocolatey:develop Mar 21, 2024
5 checks passed
@gep13
Copy link
Member

gep13 commented Mar 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate build types into individual build configurations
2 participants