Skip to content

Commit

Permalink
ci(windows): test using GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Mar 26, 2021
1 parent 49fc85d commit e7bbefa
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ packages:

chocolatey:
wanted:
firefox:
install_args: "l=fr-FR"
Firefox:
package_args: "/l:en-GB"
packagename:
version: '12.04'
source: 'mychocolatey/source'
force: true
unwanted:
- googlechrome
- GoogleChrome

snaps:
wanted:
Expand Down
26 changes: 26 additions & 0 deletions test/integration/windows/controls/pkgs_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

pkgs_wanted = %w[Firefox jq notepadplusplus]
pkgs_unwanted = %w[GoogleChrome hg]

### WANTED
control 'Wanted packages' do
title 'should be installed'

pkgs_wanted.each do |p|
describe chocolatey_package(p) do
it { should be_installed }
end
end
end

### UNWANTED
control 'Unwanted packages' do
title 'should be uninstalled'

pkgs_unwanted.each do |p|
describe chocolatey_package(p) do
it { should_not be_installed }
end
end
end
19 changes: 19 additions & 0 deletions test/salt/pillar/windows.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
packages:
chocolatey:
required:
pkgs: []
wanted:
Firefox:
package_args: "/l:en-GB"
jq:
version: '1.5'
# `1.6` already installed on the pre-salted image
force: true
notepadplusplus:
version: '7.8.8'
unwanted:
- GoogleChrome
- hg

0 comments on commit e7bbefa

Please sign in to comment.