-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
59 lines (46 loc) · 1.15 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
os: linux
language: ruby
cache: bundler
stages:
- smoke
- test
rvm:
- 2.7
- 2.5
- 2.4
env:
- SET=dev
- SET=system
script: |
# test installing the gems from $SET on this ruby version
set -e
echo create gems
bundle exec ./exe/build-gems.rb
mkdir test
cd test
export BUNDLE_GEMFILE=./Gemfile
cat <<EOF >Gemfile
source 'https://rubygems.org'
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')
gem "puppet-module-posix-default-r#{minor_version}", :path => '../pkg'
gem "puppet-module-posix-dev-r#{minor_version}", :path => '../pkg'
gem "puppet-module-posix-system-r#{minor_version}", :path => '../pkg' if ENV['SET'] == 'system'
EOF
echo setting up gem path for caching
bundle config path ../vendor/bundle
cat Gemfile
echo testing installability of the puppet-module-gems
bundle install
cat Gemfile.lock
jobs:
include:
- stage: smoke
name: "Make sure that gems build"
script: bundle exec ./exe/build-gems.rb
- stage: smoke
name: "Unit Tests"
script: bundle exec rspec spec
notifications:
email: false