@@ -2,109 +2,61 @@ name: CI
2
2
on : [push]
3
3
jobs :
4
4
puppet-3-8-7 :
5
+ env :
6
+ PUPPET_VERSIONS : " 3.8.7"
7
+ PUPPET_VERSION : " 3.8.7"
8
+ RUBOCOP_TEST : false
9
+ RSPEC_TEST : true
5
10
runs-on : ubuntu-latest
6
11
strategy :
7
12
matrix :
8
13
ruby-version : ["2.0", "2.1"]
9
14
steps :
10
15
- name : Checkout code
11
16
uses : actions/checkout@v1
12
- - name : bundle
13
- run : |
14
- apt-get update
15
- apt-get install -y cmake openssl libssl-dev
16
- echo "3.8.7" > .puppet_version
17
- bundle install --binstubs --jobs 4 --retry 3
18
- - name : rspec
19
- run : |
20
- bundle exec rspec spec/octocatalog-diff/tests
21
- bundle exec rspec spec/octocatalog-diff/integration
22
- container :
23
- image : ruby:${{matrix.ruby-version}}
24
- env :
25
- PUPPET_VERSION : " 3.8.7"
17
+ - name : Build container
18
+ run : docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}}
19
+ - name : Tests
20
+ run : docker run -e PUPPET_VERSION -e PUPPET_VERSIONS -e RSPEC_TEST -e RUBOCOP_TEST -e ENFORCE_COVERAGE octocatalog-diff:ruby${{matrix.ruby-version}} /app/script/cibuild
26
21
27
22
puppet-4-10-10 :
23
+ env :
24
+ PUPPET_VERSIONS : " 4.10.10"
25
+ PUPPET_VERSION : " 4.10.10"
26
+ RUBOCOP_TEST : false
27
+ RSPEC_TEST : true
28
28
runs-on : ubuntu-latest
29
29
strategy :
30
30
matrix :
31
31
ruby-version : ["2.1", "2.2", "2.3"]
32
32
steps :
33
33
- name : Checkout code
34
34
uses : actions/checkout@v1
35
- - name : bundle
36
- run : |
37
- apt-get update
38
- apt-get install -y cmake openssl libssl-dev
39
- echo "4.10.10" > .puppet_version
40
- bundle install --binstubs --jobs 4 --retry 3
41
- - name : spec
42
- run : |
43
- bundle exec rspec spec/octocatalog-diff/tests
44
- bundle exec rspec spec/octocatalog-diff/integration
45
- container :
46
- image : ruby:${{matrix.ruby-version}}
47
- env :
48
- PUPPET_VERSION : " 4.10.10"
35
+ - name : Build container
36
+ run : docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}}
37
+ - name : Tests
38
+ run : docker run -e PUPPET_VERSION -e PUPPET_VERSIONS -e RSPEC_TEST -e RUBOCOP_TEST -e ENFORCE_COVERAGE octocatalog-diff:ruby${{matrix.ruby-version}} /app/script/cibuild
49
39
50
40
puppet-5-5-8 :
41
+ env :
42
+ PUPPET_VERSIONS : " 5.5.8"
43
+ PUPPET_VERSION : " 5.5.8"
44
+ RUBOCOP_TEST : false
45
+ RSPEC_TEST : true
51
46
runs-on : ubuntu-latest
52
47
strategy :
53
48
matrix :
54
49
ruby-version : ["2.4", "2.5", "2.6"]
55
50
steps :
56
51
- name : Checkout code
57
52
uses : actions/checkout@v1
58
- - name : bundle
59
- run : |
60
- apt-get update
61
- apt-get install -y cmake openssl libssl-dev
62
- echo "5.5.8" > .puppet_version
63
- bundle install --binstubs --jobs 4 --retry 3
64
- - name : rspec
65
- run : |
66
- bundle exec rspec spec/octocatalog-diff/tests
67
- bundle exec rspec spec/octocatalog-diff/integration
68
- container :
69
- image : ruby:${{matrix.ruby-version}}
70
- env :
71
- PUPPET_VERSION : " 5.5.8"
72
-
73
- rubocop :
74
- runs-on : ubuntu-latest
75
- steps :
76
- - name : Checkout code
77
- uses : actions/checkout@v1
78
- - name : bundle
79
- run : |
80
- apt-get update
81
- apt-get install -y cmake openssl libssl-dev
82
- echo "5.5.8" > .puppet_version
83
- bundle install --binstubs --jobs 4 --retry 3
84
- - name : rubocop
85
- run : bundle exec rake rubocop
86
- container :
87
- image : " ruby:2.6"
88
- env :
89
- PUPPET_VERSION : " 5.5.8"
90
-
91
- coverage :
92
- runs-on : ubuntu-latest
93
- steps :
94
- - name : Checkout code
95
- uses : actions/checkout@v1
96
- - name : bundle
97
- run : |
98
- apt-get update
99
- apt-get install -y cmake openssl libssl-dev
100
- echo "5.5.8" > .puppet_version
101
- bundle install --binstubs --jobs 4 --retry 3
102
- - name : rubocop
103
- run : |
104
- bundle exec rspec spec/octocatalog-diff/tests
105
- grep -q "100% test coverage. You're all set, friend" coverage/coverage.txt
106
- container :
107
- image : " ruby:2.6"
108
- env :
109
- PUPPET_VERSION : " 5.5.8"
110
- COVERAGE : true
53
+ - name : Build container
54
+ run : docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}}-stretch
55
+ - name : Tests
56
+ run : docker run -e PUPPET_VERSION -e PUPPET_VERSIONS -e RSPEC_TEST -e RUBOCOP_TEST -e ENFORCE_COVERAGE octocatalog-diff:ruby${{matrix.ruby-version}} /app/script/cibuild
57
+ - name : Rubocop and Coverage
58
+ run : docker run -e PUPPET_VERSION -e PUPPET_VERSIONS -e RSPEC_TEST -e RUBOCOP_TEST -e ENFORCE_COVERAGE octocatalog-diff:ruby${{matrix.ruby-version}} /app/script/cibuild
59
+ if : matrix.ruby-version == '2.6'
60
+ env :
61
+ RUBOCOP_TEST : true
62
+ ENFORCE_COVERAGE : true
0 commit comments