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:
Howard Wolosky 2020-07-15 09:47:46 -07:00 коммит произвёл GitHub
Родитель 683187a94f
Коммит fcfe0c73b0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 29 добавлений и 0 удалений

1
.github/PULL_REQUEST_TEMPLATE.md поставляемый
Просмотреть файл

@ -34,6 +34,7 @@
- [ ] Comment-based help added/updated, including examples.
- [ ] [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).
- [ ] [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).
- [ ] 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.

Просмотреть файл

@ -24,6 +24,7 @@ Looking for information on how to use this module? Head on over to [README.md](
* [Code Comments](#code-comments)
* [Debugging Tips](#debugging-tips)
* [Pipeline Support](#pipeline-support)
* [Formatters](#formatters)
* [Testing](#testing)
* [Installing Pester](#installing-pester)
* [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
[![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)

Просмотреть файл

@ -35,6 +35,7 @@ jobs:
pool:
vmImage: 'windows-latest'
dependsOn: waitForRunningBuilds
timeoutInMinutes: 120
steps:
- template: ./templates/verify-testConfigSettingsHash.yaml
parameters:
@ -55,6 +56,7 @@ jobs:
pool:
vmImage: 'windows-latest'
dependsOn: waitForRunningBuilds
timeoutInMinutes: 120
steps:
- template: ./templates/verify-testConfigSettingsHash.yaml
- template: ./templates/run-staticAnalysis.yaml
@ -70,6 +72,7 @@ jobs:
pool:
vmImage: 'ubuntu-latest'
dependsOn: waitForRunningBuilds
timeoutInMinutes: 120
steps:
- template: ./templates/verify-testConfigSettingsHash.yaml
- template: ./templates/run-staticAnalysis.yaml
@ -85,6 +88,7 @@ jobs:
pool:
vmImage: 'macOS-latest'
dependsOn: waitForRunningBuilds
timeoutInMinutes: 120
steps:
- template: ./templates/verify-testConfigSettingsHash.yaml
- template: ./templates/run-staticAnalysis.yaml

Просмотреть файл

@ -28,6 +28,7 @@ jobs:
- job: Validate
pool:
vmImage: 'windows-latest'
timeoutInMinutes: 120
steps:
- template: ./templates/run-staticAnalysis.yaml
- template: ./templates/run-unitTests.yaml