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

Add PowerShell Core Build+Test to Appveyor CI #939

Merged
merged 27 commits into from Mar 21, 2018

Conversation

bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented Mar 17, 2018

PR Summary

Build PSSA and run CI tests using PowerShell Core (on Windows) in addition to the existing WMF4 and WMF5 runs.
I should also note that on my dev machine (Win10) 9 tests are always failing when being run using pwsh, hence I usually run the tests locally only using Windows PowerShell, therefore this PR will also be helpful for me not having to always run tests twice and filter out the actual from the expected failures.

Another image in the matrix was added and since AppVeyor does not seem to support conditional tasks, either a ps and pwsh task executes the action depending on the chosen image env variable.
Therefore scripts were unified in a new appveyor.psm1 module (to be consistent with PSCore) with the exception of the test scripts because they behaved differently when being run from the function defined in the module (12 failures in Windows PowerShell and PowerShell Core).
The scripts were enhanced to be more generic, hard-coded paths were removed and now only the usage of nuget install and Push-AppveyorArtifact is AppVeyor specific, therefore this should serve as a good base for running tests on non-Windows environments (on Appveyor or Travis). I requested access to AppVeyor's private beta program for Linux builds in the meantime, which I got enabled for this repo and my account. Apart from adding Import-Module .\tools\appveyor.psm1 calls, the current configuration already works on the Linux image but since there are 13 failures, the Linux build should be a different PR.
One series of tests had to be adapted to work on pwsh and 1 test was made pending (it was already pending for mac and linux).
The white-listing of branches to build was removed to allow running the appveyor builds in other forked branches as well.

I'll try to reduce the number of PRs after this a bit to give you more time for finishing off what is required for the next release. I added the 1.17 milestone to PRs that I think are worthwhile considering to get into the next release.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets. Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • NA User facing documentation needed
  • Change is not breaking
  • NA Make sure you've added a new test if existing tests do not effectively test the code changed
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

…image, let's hope it works for WMF 4 as well)
…ion for a Linux build+test (which already works when adding additional Import-Module calls but has 13 failing tests)
Copy link
Member

@JamesWTruher JamesWTruher left a comment

Choose a reason for hiding this comment

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

this looks good - how would I go about retrieving the test logs at a later date?

@@ -83,7 +83,7 @@ Describe "UseManifestExportFields" {
$results[0].Extent.Text | Should -Be "'*'"
}

It "suggests corrections for AliasesToExport with wildcard" -pending:($IsLinux -or $IsMacOS) {
It "suggests corrections for AliasesToExport with wildcard" -pending:($IsCoreClr) {
Copy link
Member

Choose a reason for hiding this comment

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

is this tracked by an issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No but Pester shows the number of pending tests. We should maybe create an issue specific for the non-Windows builds and fix/investigate it as part of making the non-Windows builds?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created an issue here

@JamesWTruher JamesWTruher merged commit 021711e into PowerShell:development Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants