Skip to content

Commit

Permalink
ci: enable Vagrant-based testing using GitHub Actions
Browse files Browse the repository at this point in the history
* Semi-automated using myii/ssf-formula#304
  • Loading branch information
myii committed Mar 26, 2021
1 parent 35a2124 commit f1af455
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/kitchen.vagrant.yml
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: 'Kitchen Vagrant (FreeBSD & OpenBSD)'
'on': ['push', 'pull_request']

env:
KITCHEN_LOCAL_YAML: 'kitchen.vagrant.yml'

jobs:
test:
runs-on: 'macos-10.15'
strategy:
fail-fast: false
matrix:
instance:
- default-freebsd-122-latest-py3
- default-freebsd-114-latest-py3
- default-openbsd-68-latest-py3
steps:
- name: 'Check out code'
uses: 'actions/checkout@v2'
- name: 'Set up Bundler cache'
uses: 'actions/cache@v1'
with:
path: 'vendor/bundle'
key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}"
restore-keys: "${{ runner.os }}-gems-"
- name: 'Run Bundler'
run: |
ruby --version
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: 'Run Test Kitchen'
run: 'bundle exec kitchen verify ${{ matrix.instance }}'
1 change: 1 addition & 0 deletions .yamllint
Expand Up @@ -16,6 +16,7 @@ ignore: |
node_modules/
test/**/states/**/*.sls
.kitchen/
test/salt/pillar/default.sls
yaml-files:
# Default settings
Expand Down
27 changes: 19 additions & 8 deletions kitchen.vagrant.yml
Expand Up @@ -3,15 +3,26 @@
---
driver:
name: vagrant
cache_directory: false
customize:
usbxhci: 'off'
gui: false
linked_clone: true
ssh:
shell: /bin/sh

platforms:
- name: freebsd-120-2019-2-py3
- name: freebsd-122-latest-py3
driver:
box_url: https://freebsd.z.vstack.com/FreeBSD-12.0.box
cache_directory: false
customize:
usbxhci: 'off'
gui: false
linked_clone: true
box: bento/freebsd-12.2
- name: freebsd-114-latest-py3
driver:
box: bento/freebsd-11.4
- name: openbsd-68-latest-py3
driver:
box: generic/openbsd6
ssh:
shell: '/bin/sh'
shell: /bin/ksh

provisioner:
salt_install: bootstrap
1 change: 1 addition & 0 deletions kitchen.yml
Expand Up @@ -310,6 +310,7 @@ suites:
- name: default
driver:
hostname: example.net
vm_hostname: example.net
provisioner:
state_top:
base:
Expand Down

0 comments on commit f1af455

Please sign in to comment.