Skip to content

Commit

Permalink
(maint) Add some testing and a travis.yml
Browse files Browse the repository at this point in the history
Prior to this commit there was an appveyor.yml and no other CI files.
This commit adds a .sync.yml for PDK 1.6.0 and configures some basic
tests for the module. The tests include a shellcheck option and enforce
rubocop. There are no spec tests currently defined.
  • Loading branch information
Jarret Lavallee committed Jun 27, 2018
1 parent ac0a955 commit ef5ee47
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 58 deletions.
32 changes: 32 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.gitlab-ci.yml:
delete: true
appveyor.yml:
delete: true

Rakefile:
extras:
- |
desc 'Syntax check shellscripts'
task :shellcheck do
Dir['{tasks,files}/**/*.sh'].each do |shell_file|
sh "shellcheck #{shell_file}" do |ok, res|
exit res.exitstatus unless ok
end
end
end
.travis.yml:
branches:
- /.*/
deploy: false
includes:
-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop shellcheck"
remove_includes:
-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
-
env: CHECK=parallel_spec
-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
rvm: 2.1.9
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
sudo: false
dist: trusty
language: ruby
cache: bundler
before_install:
- bundle -v
- rm -f Gemfile.lock
- gem update --system
- gem --version
- bundle -v
script:
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.4.1
env:
global:
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
matrix:
fast_finish: true
include:
-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop shellcheck"
branches:
only:
- master
- /^v\d/
- /.*/
notifications:
email: false
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ end

desc 'Syntax check shellscripts'
task :shellcheck do
Dir['**/*.sh'].each do |shell_file|
Dir['{tasks,files}/**/*.sh'].each do |shell_file|
sh "shellcheck #{shell_file}" do |ok, res|
exit res.exitstatus unless ok
end
Expand Down
57 changes: 0 additions & 57 deletions appveyor.yml

This file was deleted.

0 comments on commit ef5ee47

Please sign in to comment.