Skip to content

Commit 00f0ba2

Browse files
authored
Add integration tests (#263)
* Add integration test * And env vars to the matrix * Add markdown linter * Fix-up markdown * Fix ordering of test suites. We can now bring up multiple containers and test them as per the how the tests were designed. Signed-off-by: Dan Webb <dan.webb@damacus.io>
1 parent 82258ff commit 00f0ba2

File tree

11 files changed

+99
-97
lines changed

11 files changed

+99
-97
lines changed

.github/workflows/linters.yml

+29-3
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,30 @@ name: linters
44
'on':
55
pull_request:
66
push:
7-
branches:
8-
- master
7+
branches: [main]
98

109
jobs:
10+
mdl:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@master
15+
- name: Run yaml Lint
16+
uses: actionshub/markdownlint@main
17+
1118
yamllint:
1219
runs-on: ubuntu-latest
1320
steps:
1421
- name: Check out code
1522
uses: actions/checkout@master
1623
- name: Run yaml Lint
1724
uses: actionshub/yamllint@main
25+
1826
chefstyle:
1927
runs-on: ubuntu-latest
2028
strategy:
2129
matrix:
22-
ruby: ['2.5', '2.6', '2.7', '3.0']
30+
ruby: ['2.7', '3.0', '3.1']
2331
name: Chefstyle on Ruby ${{ matrix.ruby }}
2432
steps:
2533
- uses: actions/checkout@v2
@@ -28,3 +36,21 @@ jobs:
2836
ruby-version: ${{ matrix.ruby }}
2937
bundler-cache: true
3038
- run: bundle exec rake style
39+
40+
integration:
41+
runs-on: ubuntu-latest
42+
needs: [mdl, yamllint, chefstyle]
43+
name: Kitchen Verify
44+
steps:
45+
- uses: actions/checkout@v2
46+
- uses: ruby/setup-ruby@v1
47+
with:
48+
ruby-version: 3.0
49+
bundler-cache: true
50+
- name: Create & Validate containers
51+
run: |
52+
bundle exec bundle exec kitchen create hello
53+
bundle exec bundle exec kitchen test helloagain
54+
bundle exec bundle exec kitchen destroy hello
55+
env:
56+
CHEF_LICENSE: "accept-no-persist"

.markdownlint.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
default: true
2+
MD013: false
3+
MD024: false
4+
MD026: false
5+
MD036: false

.mdlrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rules "~MD013", "~MD024", "~MD026", "~MD036"

.rubocop.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
---
22
AllCops:
3-
TargetRubyVersion: 2.5
4-
5-
Exclude:
6-
- files/default/vendor/**/*
7-
- vendor/**/*
8-
- tmp/**/*
3+
TargetRubyVersion: 2.7

.travis.yml

-46
This file was deleted.

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
## 2.6.9 (2019-05-23)
7777

78-
- Support Chef Infra Client 15+ license acceptance. If the license has been accepted on your local workstation it will be passed through the Chef Infra installation. The license can also be set via the `chef_license` configuration property. See https://docs.chef.io/chef_license_accept.html for more details.
78+
- Support Chef Infra Client 15+ license acceptance. If the license has been accepted on your local workstation it will be passed through the Chef Infra installation. The license can also be set via the `chef_license` configuration property. See <https://docs.chef.io/chef_license_accept.html> for more details.
7979
- Add a new config option `pull_platform_image` (true/false) which allows you to disable pulling the platform image on every dokken converge/test. This is particularly useful for local image testing.
8080

8181
## 2.6.8 (2019-03-19)

CODE_OF_CONDUCT.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
Please refer to the Chef Community Code of Conduct at https://www.chef.io/code-of-conduct/
1+
# Code of Conduct
2+
3+
Please refer to the Chef Community Code of Conduct at <https://www.chef.io/code-of-conduct/>

0 commit comments

Comments
 (0)