-
Notifications
You must be signed in to change notification settings - Fork 20
107 lines (100 loc) · 2.78 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
name: ci
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cookstyle:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Chef Workstation
uses: actionshub/chef-install@main
- name: Run Cookstyle
run: chef exec rake cookstyle
env:
CHEF_LICENSE: accept-no-persist
markdownlint-cli:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run markdownlint-cli
uses: nosborn/[email protected]
with:
files: .
config_file: ".markdownlint.yaml"
rspec:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Chef Workstation
uses: actionshub/chef-install@main
- name: Install DNSimple gem
run: chef gem install -N dnsimple -v '~> 8'
env:
CHEF_LICENSE: accept-no-persist
- name: Rspec
run: chef exec rake spec
env:
CHEF_LICENSE: accept-no-persist
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run YAML Lint
uses: actionshub/yamllint@main
integration:
needs:
- cookstyle
- markdownlint-cli
- rspec
- yamllint
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'centos-8'
- 'rockylinux-8'
- 'rockylinux-9'
- 'ubuntu-2004'
- 'ubuntu-2204'
suite:
- 'create'
- 'update'
fail-fast: false
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Chef Workstation
uses: actionshub/chef-install@main
- name: Install DNSimple gem
run: chef gem install -N dnsimple -v '~> 8'
env:
CHEF_LICENSE: accept-no-persist
- name: Run Test Kitchen
uses: actionshub/test-kitchen@main
env:
CHEF_LICENSE: accept-no-persist
DNSIMPLE_ACCESS_TOKEN: ${{ secrets.DNSIMPLE_ACCESS_TOKEN }}
DNSIMPLE_TEST_DOMAIN: ${{ matrix.suite }}-record-${{ matrix.os }}-dnsimple.xyz
KITCHEN_LOCAL_YAML: kitchen.yml
with:
suite: ${{ matrix.suite }}-record
os: ${{ matrix.os }}
- name: Debug
if: failure()
run: |
set -x
sudo journalctl -l --since today
KITCHEN_LOCAL_YAML=kitchen.yml DNSIMPLE_TEST_DOMAIN=${{ matrix.suite }}-record-${{ matrix.os }}-dnsimple.xyz /usr/bin/kitchen exec \
${{ matrix.suite }}-record-${{ matrix.os }} -c "journalctl -l"