forked from dahlbyk/posh-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (33 loc) · 1.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
language: generic
branches:
only:
- master
stages:
- name: linux
- name: osx
if: type != pull_request OR head_branch =~ osx
jobs:
include:
- stage: linux
os: linux
dist: xenial
sudo: false
addons:
apt:
sources:
- sourceline: deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main
key_url: https://packages.microsoft.com/keys/microsoft.asc
packages:
- powershell
before_install:
- pwsh -c 'Set-PSRepository -Name PSGallery -InstallationPolicy Trusted'
- pwsh -c 'Install-Module Pester -AllowPrerelease -MinimumVersion 5.0.0 -MaximumVersion 5.99.99 -Scope CurrentUser -Force | Out-Null'
- stage: osx
os: osx
before_install:
- brew update
- brew install --cask powershell
- pwsh -c 'Set-PSRepository -Name PSGallery -InstallationPolicy Trusted'
- pwsh -c 'Install-Module Pester -MinimumVersion 5.0.0 -MaximumVersion 5.99.99 -Scope CurrentUser -Force | Out-Null'
script:
- pwsh -c 'Import-Module Pester -PassThru; $res = Invoke-Pester -Path test -Output Detailed -PassThru -ErrorAction SilentlyContinue; if (!$res -or ($res.FailedCount -gt 0)) { $Error | Format-List * -Force; exit 1 }'