Skip to content

Commit fbcabaa

Browse files
authored
Merge pull request #91 from trinitronx/migrate-to-github-actions
Migrate to GitHub actions
2 parents bcf1058 + f3f7639 commit fbcabaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+950
-250
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# These are supported funding model platforms
22

33
github: [trinitronx] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
#patreon: # Replace with a single Patreon username
4+
patreon: phasik # Replace with a single Patreon username
55
#open_collective: # Replace with a single Open Collective username
6-
#ko_fi: # Replace with a single Ko-fi username
6+
ko_fi: trinitronx # Replace with a single Ko-fi username
77
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
99
liberapay: trinitronx
1010
#issuehunt: # Replace with a single IssueHunt username
1111
#otechie: # Replace with a single Otechie username
1212
custom: ['https://paypal.me/JamesCuzella'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13-

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: ci
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- master
8+
- main
9+
- develop
10+
push:
11+
branches:
12+
- master
13+
- main
14+
- develop
15+
16+
jobs:
17+
rake-ci:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v2
22+
- uses: ruby/setup-ruby@v1
23+
with:
24+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25+
- name: Run rake ci
26+
run: |
27+
bundle exec rake ci
28+
29+
integration:
30+
needs: [rake-ci]
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
matrix:
34+
#exclude:
35+
include:
36+
- os: 'macos-11'
37+
suite: '--log-level debug default'
38+
KITCHEN_LOCAL_YAML: '.kitchen.exec.yml'
39+
- os: 'macos-12'
40+
suite: '--log-level debug default'
41+
KITCHEN_LOCAL_YAML: '.kitchen.exec.yml'
42+
fail-fast: false
43+
44+
steps:
45+
- name: Check out code
46+
uses: actions/checkout@v2
47+
- name: Install Chef
48+
uses: actionshub/chef-install@main
49+
- name: Test Kitchen
50+
uses: actionshub/test-kitchen@main
51+
env:
52+
TERM: xterm-color
53+
CHEF_LICENSE: accept-no-persist
54+
CHEF_INSTALL_STRATEGY: skip
55+
CHEF_OMNIBUS_ROOT: /opt/chef-workstation
56+
KITCHEN_LOCAL_YAML: ${{ matrix.KITCHEN_LOCAL_YAML }}
57+
with:
58+
suite: ${{ matrix.suite }}
59+
os: ${{ matrix.os }}
60+
- name: Print debug output on failure
61+
if: failure()
62+
run: |
63+
set -x
64+
export TERM=xterm-color
65+
log show --color always --last 5m
66+
KITCHEN_LOCAL_YAML=${{ matrix.KITCHEN_LOCAL_YAML }} kitchen exec ${{ matrix.suite }}-${{ matrix.os }} -c "syslog"

.github/workflows/pre-commit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- main
8+
- develop
9+
push:
10+
branches:
11+
- master
12+
- main
13+
- develop
14+
15+
jobs:
16+
pre-commit:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-python@v3
21+
- uses: pre-commit/[email protected]

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ Berksfile.lock
1212
Gemfile.lock
1313
bin/*
1414
.bundle/*
15-

.kitchen.exec.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
driver:
3+
name: exec
4+
5+
transport:
6+
name: exec
7+
8+
provisioner:
9+
name: chef_zero
10+
deprecations_as_errors: true
11+
install_strategy: <%= ENV['CHEF_INSTALL_STRATEGY'] || 'once' %>
12+
chef_omnibus_root: <%= ENV['CHEF_OMNIBUS_ROOT'] || '/opt/chef-workstation' %>
13+
14+
verifier:
15+
# This will eventually become 'inputs'
16+
# References:
17+
# - https://github.com/inspec/kitchen-inspec/issues/237
18+
# - https://github.com/inspec/inspec/pull/4398
19+
# - https://docs.chef.io/inspec/inputs/#what-happened-to-attributes
20+
attributes:
21+
test_kitchen_user: <%= ENV['USER'] || 'vagrant' %>
22+
23+
platforms:
24+
- name: macos-11
25+
- name: macos-12

.kitchen.libvirt.ssh.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ transport:
4444

4545
provisioner:
4646
# name: chef_zero
47-
client_rb:
48-
ohai.optional_plugins: [ ':Passwd' ]
4947
transport:
5048
ssh_gateway: saturn.local
5149
ssh_gateway_username: trinitronx
@@ -57,6 +55,13 @@ provisioner:
5755

5856
verifier:
5957
name: inspec
58+
# This will eventually become 'inputs'
59+
# References:
60+
# - https://github.com/inspec/kitchen-inspec/issues/237
61+
# - https://github.com/inspec/inspec/pull/4398
62+
# - https://docs.chef.io/inspec/inputs/#what-happened-to-attributes
63+
attributes:
64+
test_kitchen_user: 'vagrant'
6065
## Client error, can't connect to 'ssh' backend: Only one of proxy_command or bastion_host needs to be specified]
6166
## Apparently the transport ssh_gateway option is actually passed through to InSpec
6267
# proxy_command: ssh saturn.local -q0 %h:%p

.kitchen.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ driver:
44

55
provisioner:
66
name: chef_zero
7+
client_rb:
8+
ohai.optional_plugins: [ ':Passwd' ]
79
encrypted_data_bag_secret_key_path: 'test/fixtures/encrypted_data_bag_secret'
810
data_bags_path: 'test/fixtures/data_bags'
911

12+
verifier:
13+
name: inspec
14+
1015
platforms:
1116
- name: macosx-10.10
1217

0 commit comments

Comments
 (0)