Skip to content

Commit cbe15b1

Browse files
committed
Refactor Actions CI jobs and add Puppet 7 / Ruby 3
1 parent 089b699 commit cbe15b1

File tree

1 file changed

+20
-60
lines changed

1 file changed

+20
-60
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,40 @@
11
name: CI
22
on: [push, pull_request, workflow_dispatch]
33
jobs:
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
10-
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
ruby-version: ["2.0", "2.1"]
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v1
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
21-
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
4+
rspec:
285
runs-on: ubuntu-latest
296
strategy:
307
matrix:
31-
ruby-version: ["2.1", "2.2", "2.3"]
32-
steps:
33-
- name: Checkout code
34-
uses: actions/checkout@v1
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
39-
40-
puppet-5-5-8:
8+
include:
9+
- { puppet-version: "3.8.7", ruby-version: "2.0", docker-tag: "" }
10+
- { puppet-version: "3.8.7", ruby-version: "2.1", docker-tag: "" }
11+
- { puppet-version: "4.10.10", ruby-version: "2.1", docker-tag: "" }
12+
- { puppet-version: "4.10.10", ruby-version: "2.2", docker-tag: "" }
13+
- { puppet-version: "4.10.10", ruby-version: "2.3", docker-tag: "" }
14+
- { puppet-version: "5.5.22", ruby-version: "2.4", docker-tag: "-stretch" }
15+
- { puppet-version: "5.5.22", ruby-version: "2.5", docker-tag: "-stretch" }
16+
- { puppet-version: "5.5.22", ruby-version: "2.6", docker-tag: "-stretch" }
17+
- { puppet-version: "6.20.0", ruby-version: "2.5", docker-tag: "-stretch" }
18+
- { puppet-version: "6.20.0", ruby-version: "2.6", docker-tag: "-stretch" }
19+
- { puppet-version: "7.3.0", ruby-version: "2.5", docker-tag: "-stretch" }
20+
- { puppet-version: "7.3.0", ruby-version: "2.6", docker-tag: "-stretch" }
21+
- { puppet-version: "7.3.0", ruby-version: "2.7", docker-tag: "-buster" }
22+
- { puppet-version: "7.3.0", ruby-version: "3.0", docker-tag: "-buster" }
4123
env:
42-
PUPPET_VERSIONS: "5.5.8"
43-
PUPPET_VERSION: "5.5.8"
44-
RUBOCOP_TEST: false
4524
RSPEC_TEST: true
46-
runs-on: ubuntu-latest
47-
strategy:
48-
matrix:
49-
ruby-version: ["2.4", "2.5", "2.6"]
50-
steps:
51-
- name: Checkout code
52-
uses: actions/checkout@v1
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-
58-
puppet-6-18-0:
59-
env:
60-
PUPPET_VERSIONS: "6.18.0"
61-
PUPPET_VERSION: "6.18.0"
25+
PUPPET_VERSION: ${{matrix.puppet-version }}
26+
PUPPET_VERSIONS: ${{matrix.puppet-version }}
6227
RUBOCOP_TEST: false
63-
RSPEC_TEST: true
64-
runs-on: ubuntu-latest
65-
strategy:
66-
matrix:
67-
ruby-version: ["2.5", "2.6"]
6828
steps:
6929
- name: Checkout code
7030
uses: actions/checkout@v1
7131
- name: Build container
72-
run: docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}}-stretch
32+
run: docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}}${{matrix.docker-tag}}
7333
- name: Tests
7434
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
7535
- name: Rubocop and Coverage
7636
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
77-
if: matrix.ruby-version == '2.6'
37+
if: matrix.ruby-version == '2.6' && matrix.puppet-version == '5.5.22'
7838
env:
7939
RUBOCOP_TEST: true
8040
ENFORCE_COVERAGE: true

0 commit comments

Comments
 (0)