Skip to content

Commit 1e4b1bf

Browse files
committed
Create .travis.yml
1 parent 8361352 commit 1e4b1bf

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: generic
2+
3+
services:
4+
- docker
5+
6+
install:
7+
- docker pull microsoft/powershell:6.0.4-ubuntu-trusty
8+
9+
script:
10+
# Unit Tests for PowerShell scripts
11+
- docker run -v ${TRAVIS_BUILD_DIR}:/tmp/src/ microsoft/powershell:6.0.4-ubuntu-trusty pwsh -c "
12+
\$ProgressPreference='SilentlyContinue';
13+
Install-Module Pester -Force -SkipPublisherCheck -Scope CurrentUser;
14+
Invoke-Pester /tmp/src;
15+
exit $LastExitCode;"
16+
# Linting for PowerShell scripts
17+
- docker run -v ${TRAVIS_BUILD_DIR}:/tmp/src/ microsoft/powershell:6.0.4-ubuntu-trusty pwsh -c "
18+
\$ProgressPreference='SilentlyContinue';
19+
Install-Module PSScriptAnalyzer -Force -SkipPublisherCheck -Scope CurrentUser;
20+
Invoke-ScriptAnalyzer -Path /tmp/src -Recurse -ReportSummary -EnableExit;
21+
exit $LastExitCode;"

0 commit comments

Comments
 (0)