Skip to content

Commit

Permalink
Composite action
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Webb <[email protected]>
  • Loading branch information
damacus committed Dec 9, 2024
1 parent ded4bb4 commit 7c1e1fb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 43 deletions.
28 changes: 28 additions & 0 deletions .github/actions/kitchen-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Kitchen Test'
description: 'Runs Test Kitchen tests for a specific suite'

inputs:
suite:
description: 'Test suite to run'
required: true
os:
description: 'OS to test against'
required: true

runs:
using: composite
steps:
- name: Install VirtualBox
shell: bash
run: |
brew update
brew upgrade virtualbox
- name: Install Chef
uses: actionshub/[email protected]

- name: Kitchen Converge
uses: actionshub/[email protected]
with:
suite: ${{ inputs.suite }}
os: ${{ inputs.os }}
48 changes: 5 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install VirtualBox
run: |
brew update
brew upgrade virtualbox
- name: Install Chef
uses: actionshub/[email protected]
- name: Kitchen Converge
uses: actionshub/[email protected]
- uses: ./.github/actions/kitchen-test
with:
suite: firewalld
os: ${{ matrix.os }}
Expand All @@ -54,14 +47,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install VirtualBox
run: |
brew update
brew upgrade virtualbox
- name: Install Chef
uses: actionshub/[email protected]
- name: Kitchen Converge
uses: actionshub/[email protected]
- uses: ./.github/actions/kitchen-test
with:
suite: iptables
os: ${{ matrix.os }}
Expand All @@ -78,17 +64,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Chef
uses: actionshub/[email protected]
- name: Install VirtualBox
run: |
brew update
brew upgrade virtualbox
- name: Kitchen Converge
uses: actionshub/[email protected]
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
- uses: ./.github/actions/kitchen-test
with:
suite: ufw
os: ${{ matrix.os }}
Expand All @@ -105,14 +81,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Chef
uses: actionshub/[email protected]
- name: Install VirtualBox
run: |
brew update
brew upgrade virtualbox
- name: Kitchen Converge
uses: actionshub/[email protected]
- uses: ./.github/actions/kitchen-test
with:
suite: nftables
os: ${{ matrix.os }}
Expand All @@ -129,14 +98,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Chef
uses: actionshub/[email protected]
- name: Install VirtualBox
run: |
brew update
brew upgrade virtualbox
- name: Kitchen Converge
uses: actionshub/[email protected]
- uses: ./.github/actions/kitchen-test
with:
suite: firewalld-dbus
os: ${{ matrix.os }}
Expand Down

0 comments on commit 7c1e1fb

Please sign in to comment.