Commit Graph

20 Commits

Author SHA1 Message Date
Chawye Hsu
d9f55a3a0a refactor(ci,tests): Support both AppVeyor and GitHub Actions (#4655) 2022-01-14 19:40:35 +08:00
Hsiao-nan Cheung
d7fb97f517 test(zstd): Fix 'zstd' extraction error in test (#4651) 2022-01-13 16:32:18 +08:00
worldyun
af7a6f6d0e feat(decompress): Support Zstandard archive (#4372)
Co-authored-by: WorldYun <worldyun@qq.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2021-11-10 09:40:11 +08:00
Jakub Čábera
a09926f5b9 fix(appveyor): use VS2019 image to fix PS6 issues (#3646)
Close #3643
2019-09-17 21:56:51 +02:00
Richard Kuhnt
f63219fd1d decompress(tests): Improve installation of lessmsi and innounp (#3409) 2019-04-28 19:00:02 +02:00
Richard Kuhnt
468649c88d checkver: Add 're' alias 'regex' 2018-09-18 18:56:40 +02:00
Richard Kuhnt
7311b41b8d appveyor: rebuild cache 2018-09-18 18:49:12 +02:00
Richard Kuhnt
ac3ee76672 appveyor: require BuildHelpers version 2.0.0 2018-09-18 18:47:42 +02:00
Richard Kuhnt
d3e1bdd6ff appveyor: rebuild cache 2018-09-18 18:46:16 +02:00
Richard Kuhnt
c0295f0ae0 appveyor: Run tests for PowerShell 5 and 6 (#2603)
- Adds `!linter` commit flag to skip PSScriptAnalyzer
- Adds `!manifests` commit flag to skip manifest validation
- Skips manifest validation if no JSON has changed
- Skips tests and linting if no PowerShell script has changed
- Validates only manifests that changed
- Validates all manifests if `schema.json` changed
2018-09-18 18:37:43 +02:00
Chawye Hsu
731247876d [Pending] Finally we add the code linting and its tests! (#2108)
* Lint: PSPossibleIncorrectComparisonWithNull

* Lint: PSUseLiteralInitializerForHashtable

* Lint: PSUseBOMForUnicodeEncodedFile

* Lint: PSUseApprovedVerbs

* Lint: PSAvoidGlobalVars

* Lint: PSAvoidUsingEmptyCatchBlock

* Lint: PSUseShouldProcessForStateChangingFunctions

* Lint helper: Add PSScriptAnalyzer integration for vscode

* Fix lint: PSUseBOMForUnicodeEncodedFile

* Tests: ignore previous TestResults.xml

* Tests: add PowerShell script linting into tests!

* Add PSScriptAnalyzer into appveyor ci

* Update Scoop-Linting.Tests.ps1
2018-03-13 14:26:55 +01:00
Richard Kuhnt
872517b898 Update tests to work with pester version 4.* (#1711)
* Remove custom choco options
* Use Install-Module to install Pester
2017-11-27 15:27:38 +01:00
Roy Ivy III
db8054c909 add optional "test-time" customization of AppVeyor test runner
* add $env:APPVEYOR_CHOCO_PESTER_OPTIONS to the `choco` install command for the `pester`
  test runner within the "appveyor.yml" config file
* NOTE: AppVeyor testing will issue advisory note when the variable is non-NULL

* allows customization of `pester` install, eg, version pinning, without requiring any
  further, future changes to "appveyor.yml", avoiding log noise
* mitigates test failures due solely to the test runner

.# Discussion

This change was implemented in response to multiple automated test failures which
occurred due to a regression within the `pester` test runner. The change adds the ability
to specify the `pester` version (aka, "version pinning") on AppVeyor via the "test-time"
configurable environment variable, $env:APPVEYOR_CHOCO_PESTER_OPTIONS.

By using this configurability, no changes to the project code base are needed when testing
with a specific test runner version is needed, eg, when "pester@latest" is bugged. This
avoids adding commits, which are otherwise irrelevant to development, to the project
history.

To pin a specific version of `pester`, set the "APPVEYOR_CHOCO_PESTER_OPTIONS" environment
variable to "--version=M.m.b" (eg, "--version=3.3.11") via the AppVeyor project settings
web page; a NULL or missing value will cause the usual installation of "pester@latest".

Notably, this does add a semi-hidden testing dependency. But, if testing is successful for
a given setting of the environment variable (eg, empty/NULL or "--version=M.m.b"), it will
continue to succeed for tests on subsequent commits. The only caveat is that if some added
functionality of a "pester@later" version is used, the remote automated testing might fail
due to `pester` being pinned to an earlier version. Because of this, the testing code
issues an advisory notation that the test runner installation has been customized whenever
the environment variable contains a non-NULL value.
2015-12-19 10:58:57 -06:00
Roy Ivy III
6d9bca805f whitespace cleanup
* makes changes to almost all main repo files to be in accordance with .editorconfig
* some files in "test\fixtures\..." were left alone to avoid breaking tests
* NOTE: whitespace changes *only* (`git diff -b` shows no changes)
2015-08-17 22:54:43 -05:00
Roy Ivy III
e682a7ac8f Fix appveyor.yml, removing user-specific notification settings
.# Discussion

Appveyor doesn't have partial `appveyor.yml` suppression. So, unless the
`appveyor.yml` configuration file is completely suppressed, non-primary devs
receive notification errors with every build/test of the application. By
removing the user-specific notifications, other devs can now build/test the
application code (via the recipe specified within `appveyor.yml`) without
receiving notification errors.

For any given developer, personalized notification settings can be added on
top of the repo `appveyor.yml` project settings via the "Settings / Notifications"
section.
2015-07-23 00:26:56 -05:00
Simon Hartcher
4ece1cf7c2 Fix build exiting when all tests pass 2015-04-12 12:10:54 +10:00
Simon Hartcher
f0b4e4e117 Fix hashtable test failing 2015-04-12 12:10:53 +10:00
Simon Hartcher
633278de8f Enable pester to exit powershell session on failure 2015-04-12 12:10:35 +10:00
Simon Hartcher
558e6eced1 Implement testing using Pester
Integrate with AppVeyor
2015-04-12 12:08:08 +10:00
Simon Hartcher
9c964418ca Add continuous integration using AppVeyor
The AppVeyor build installs Scoop, then Invoke-Build which runs
some tests.
2015-04-09 15:16:25 +10:00