Formatter guidelines and CI job timeout extensions (#263)
* Add Formatter guidelines to CONTRIBUTING and the PR template * Increase permitted time per-platform for CI validation from 60 -> 120 min
This commit is contained in:
Родитель
683187a94f
Коммит
fcfe0c73b0
|
@ -34,6 +34,7 @@
|
||||||
- [ ] Comment-based help added/updated, including examples.
|
- [ ] Comment-based help added/updated, including examples.
|
||||||
- [ ] [Static analysis](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#static-analysis) is reporting back clean.
|
- [ ] [Static analysis](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#static-analysis) is reporting back clean.
|
||||||
- [ ] New/changed code adheres to our [coding guidelines](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#coding-guidelines).
|
- [ ] New/changed code adheres to our [coding guidelines](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#coding-guidelines).
|
||||||
|
- [ ] [Formatters were created](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#formatters) for any new types being added.
|
||||||
- [ ] New/changed code continues to [support the pipeline](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#pipeline-support).
|
- [ ] New/changed code continues to [support the pipeline](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#pipeline-support).
|
||||||
- [ ] Changes to the manifest file follow the [manifest guidance](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#module-manifest).
|
- [ ] Changes to the manifest file follow the [manifest guidance](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#module-manifest).
|
||||||
- [ ] Unit tests were added/updated and are all passing. See [testing guidelines](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#testing). This includes making sure that all pipeline input variations have been covered.
|
- [ ] Unit tests were added/updated and are all passing. See [testing guidelines](https://github.com/microsoft/PowerShellForGitHub/blob/master/CONTRIBUTING.md#testing). This includes making sure that all pipeline input variations have been covered.
|
||||||
|
|
|
@ -24,6 +24,7 @@ Looking for information on how to use this module? Head on over to [README.md](
|
||||||
* [Code Comments](#code-comments)
|
* [Code Comments](#code-comments)
|
||||||
* [Debugging Tips](#debugging-tips)
|
* [Debugging Tips](#debugging-tips)
|
||||||
* [Pipeline Support](#pipeline-support)
|
* [Pipeline Support](#pipeline-support)
|
||||||
|
* [Formatters](#formatters)
|
||||||
* [Testing](#testing)
|
* [Testing](#testing)
|
||||||
* [Installing Pester](#installing-pester)
|
* [Installing Pester](#installing-pester)
|
||||||
* [Configuring Your Environment](#configuring-your-environment)
|
* [Configuring Your Environment](#configuring-your-environment)
|
||||||
|
@ -348,6 +349,28 @@ new functionality added to the module embraces this design.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
### Formatters
|
||||||
|
|
||||||
|
[Our goal](https://github.com/microsoft/PowerShellForGitHub/issues/27) is to have automattic
|
||||||
|
formatting for all `GitHub.*` types that this project defines.
|
||||||
|
|
||||||
|
Formatting was first introduced to the project with [#205](https://github.com/microsoft/PowerShellForGitHub/pull/205),
|
||||||
|
and succcesive PR's which introduce new types have added their additional formatters as well.
|
||||||
|
Eventually we will get Formatters for all previously introduced types as well.
|
||||||
|
|
||||||
|
Formatter files can be found in [/Formatters](https://github.com/microsoft/PowerShellForGitHub/tree/master/Formatters).
|
||||||
|
|
||||||
|
When adding a new formatter file, keep the following in mind:
|
||||||
|
|
||||||
|
* One formatter file per PowerShell module file, and name them similarly
|
||||||
|
(e.g. `GitHubRepositories.ps1` gets a `Formatters\GitHubRepositories.Format.ps1xml` file)
|
||||||
|
* Be sure to add the formatter file to the manifest (common mistake to forget this).
|
||||||
|
* Don't display all the type's properties ...just choose the most relevant pieces of information;
|
||||||
|
sometimes this might mean using a script block to grab an inner-property or to perform a
|
||||||
|
calculation.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
[![Build status](https://dev.azure.com/ms/PowerShellForGitHub/_apis/build/status/PowerShellForGitHub-CI?branchName=master)](https://dev.azure.com/ms/PowerShellForGitHub/_build/latest?definitionId=109&branchName=master)
|
[![Build status](https://dev.azure.com/ms/PowerShellForGitHub/_apis/build/status/PowerShellForGitHub-CI?branchName=master)](https://dev.azure.com/ms/PowerShellForGitHub/_build/latest?definitionId=109&branchName=master)
|
||||||
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/ms/PowerShellForGitHub/109/master)](https://dev.azure.com/ms/PowerShellForGitHub/_build/latest?definitionId=109&branchName=master)
|
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/ms/PowerShellForGitHub/109/master)](https://dev.azure.com/ms/PowerShellForGitHub/_build/latest?definitionId=109&branchName=master)
|
||||||
|
|
|
@ -35,6 +35,7 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
dependsOn: waitForRunningBuilds
|
dependsOn: waitForRunningBuilds
|
||||||
|
timeoutInMinutes: 120
|
||||||
steps:
|
steps:
|
||||||
- template: ./templates/verify-testConfigSettingsHash.yaml
|
- template: ./templates/verify-testConfigSettingsHash.yaml
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -55,6 +56,7 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
dependsOn: waitForRunningBuilds
|
dependsOn: waitForRunningBuilds
|
||||||
|
timeoutInMinutes: 120
|
||||||
steps:
|
steps:
|
||||||
- template: ./templates/verify-testConfigSettingsHash.yaml
|
- template: ./templates/verify-testConfigSettingsHash.yaml
|
||||||
- template: ./templates/run-staticAnalysis.yaml
|
- template: ./templates/run-staticAnalysis.yaml
|
||||||
|
@ -70,6 +72,7 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
dependsOn: waitForRunningBuilds
|
dependsOn: waitForRunningBuilds
|
||||||
|
timeoutInMinutes: 120
|
||||||
steps:
|
steps:
|
||||||
- template: ./templates/verify-testConfigSettingsHash.yaml
|
- template: ./templates/verify-testConfigSettingsHash.yaml
|
||||||
- template: ./templates/run-staticAnalysis.yaml
|
- template: ./templates/run-staticAnalysis.yaml
|
||||||
|
@ -85,6 +88,7 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-latest'
|
vmImage: 'macOS-latest'
|
||||||
dependsOn: waitForRunningBuilds
|
dependsOn: waitForRunningBuilds
|
||||||
|
timeoutInMinutes: 120
|
||||||
steps:
|
steps:
|
||||||
- template: ./templates/verify-testConfigSettingsHash.yaml
|
- template: ./templates/verify-testConfigSettingsHash.yaml
|
||||||
- template: ./templates/run-staticAnalysis.yaml
|
- template: ./templates/run-staticAnalysis.yaml
|
||||||
|
|
|
@ -28,6 +28,7 @@ jobs:
|
||||||
- job: Validate
|
- job: Validate
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
|
timeoutInMinutes: 120
|
||||||
steps:
|
steps:
|
||||||
- template: ./templates/run-staticAnalysis.yaml
|
- template: ./templates/run-staticAnalysis.yaml
|
||||||
- template: ./templates/run-unitTests.yaml
|
- template: ./templates/run-unitTests.yaml
|
||||||
|
|
Загрузка…
Ссылка в новой задаче