-
Notifications
You must be signed in to change notification settings - Fork 232
93 lines (87 loc) · 2.17 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
name: Lint & Unit
"on":
pull_request:
push:
branches:
- main
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run yaml Lint
uses: actionshub/yamllint@main
chefstyle:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.7"]
name: Chefstyle on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: r7kamura/rubocop-problem-matchers-action@v1
- run: bundle exec chefstyle
unit:
name: Unit test on Ruby ${{ matrix.ruby }}
needs: [yamllint, chefstyle]
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ["2.7", "3.0", "3.1"]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake spec
integration-windows:
name: Integration test on Windows
runs-on: windows-latest
needs: unit
strategy:
fail-fast: false
matrix:
suite: [default]
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}
integration-linux:
name: Integration test on Linux
runs-on: windows-latest
needs: unit
strategy:
fail-fast: false
matrix:
suite: [default, context, capabilities, arm64, amd64, inspec]
os:
- amazonlinux-2
- ubuntu-18.04
- ubuntu-20.04
- fedora-latest
- centos-7
- centos-8
- oraclelinux-7
- rockylinux-8
- debian-9
- debian-10
- opensuse-15
- dockerfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- run: bundle exec kitchen test ${{ matrix.suite }}-${{ matrix.os }}