Skip to content

Commit 8ab60b9

Browse files
committed
ci(macos): enable testing using GitHub Actions
* Automated using myii/ssf-formula#443
1 parent e8a1237 commit 8ab60b9

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
name: 'Kitchen (macOS)'
5+
'on': ['push', 'pull_request']
6+
7+
env:
8+
KITCHEN_LOCAL_YAML: 'kitchen.macos.yml'
9+
10+
jobs:
11+
test-12:
12+
runs-on: 'macos-12'
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
instance:
17+
- default-macos-12-latest-py3
18+
steps:
19+
- name: 'Check out code'
20+
uses: 'actions/checkout@v2'
21+
- name: 'Set up Bundler cache'
22+
uses: 'actions/cache@v1'
23+
with:
24+
path: 'vendor/bundle'
25+
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
26+
restore-keys: "${{ runner.os }}-gems-"
27+
- name: 'Run Bundler'
28+
run: |
29+
ruby --version
30+
bundle config path vendor/bundle
31+
bundle install --jobs 4 --retry 3
32+
- name: 'Run Test Kitchen'
33+
run: 'bundle exec kitchen verify ${{ matrix.instance }}'
34+
test-11:
35+
runs-on: 'macos-11'
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
instance:
40+
- default-macos-11-latest-py3
41+
steps:
42+
- name: 'Check out code'
43+
uses: 'actions/checkout@v2'
44+
- name: 'Set up Bundler cache'
45+
uses: 'actions/cache@v1'
46+
with:
47+
path: 'vendor/bundle'
48+
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
49+
restore-keys: "${{ runner.os }}-gems-"
50+
- name: 'Run Bundler'
51+
run: |
52+
ruby --version
53+
bundle config path vendor/bundle
54+
bundle install --jobs 4 --retry 3
55+
- name: 'Run Test Kitchen'
56+
run: 'bundle exec kitchen verify ${{ matrix.instance }}'
57+
test-1015:
58+
runs-on: 'macos-10.15'
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
instance:
63+
- default-macos-1015-latest-py3
64+
steps:
65+
- name: 'Check out code'
66+
uses: 'actions/checkout@v2'
67+
- name: 'Set up Bundler cache'
68+
uses: 'actions/cache@v1'
69+
with:
70+
path: 'vendor/bundle'
71+
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
72+
restore-keys: "${{ runner.os }}-gems-"
73+
- name: 'Run Bundler'
74+
run: |
75+
ruby --version
76+
bundle config path vendor/bundle
77+
bundle install --jobs 4 --retry 3
78+
- name: 'Run Test Kitchen'
79+
run: 'bundle exec kitchen verify ${{ matrix.instance }}'

kitchen.macos.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
driver:
5+
name: exec
6+
7+
provisioner:
8+
sudo: true
9+
salt_install: bootstrap
10+
salt_bootstrap_options: -P stable latest
11+
salt_call_command: /opt/salt/bin/salt-call
12+
13+
platforms:
14+
- name: macos-12-latest-py3
15+
verifier:
16+
inputs:
17+
saltmajorversion: 3004
18+
- name: macos-11-latest-py3
19+
verifier:
20+
inputs:
21+
saltmajorversion: 3004
22+
- name: macos-1015-latest-py3
23+
verifier:
24+
inputs:
25+
saltmajorversion: 3004

test/integration/default/inspec.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ supports:
2424
- platform-name: gentoo
2525
- platform-name: almalinux
2626
- platform-name: rocky
27+
- platform-name: mac_os_x
2728
- platform: windows

0 commit comments

Comments
 (0)