From 8ab60b9689158035a4d60a165729135b086e499d Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 16 May 2022 00:02:17 +0100 Subject: [PATCH] ci(macos): enable testing using GitHub Actions * Automated using https://github.com/myii/ssf-formula/pull/443 --- .github/workflows/kitchen.macos.yml | 79 +++++++++++++++++++++++++++++ kitchen.macos.yml | 25 +++++++++ test/integration/default/inspec.yml | 1 + 3 files changed, 105 insertions(+) create mode 100644 .github/workflows/kitchen.macos.yml create mode 100644 kitchen.macos.yml diff --git a/.github/workflows/kitchen.macos.yml b/.github/workflows/kitchen.macos.yml new file mode 100644 index 0000000..038ceb6 --- /dev/null +++ b/.github/workflows/kitchen.macos.yml @@ -0,0 +1,79 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +name: 'Kitchen (macOS)' +'on': ['push', 'pull_request'] + +env: + KITCHEN_LOCAL_YAML: 'kitchen.macos.yml' + +jobs: + test-12: + runs-on: 'macos-12' + strategy: + fail-fast: false + matrix: + instance: + - default-macos-12-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 }}' + test-11: + runs-on: 'macos-11' + strategy: + fail-fast: false + matrix: + instance: + - default-macos-11-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 }}' + test-1015: + runs-on: 'macos-10.15' + strategy: + fail-fast: false + matrix: + instance: + - default-macos-1015-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 }}' diff --git a/kitchen.macos.yml b/kitchen.macos.yml new file mode 100644 index 0000000..2528195 --- /dev/null +++ b/kitchen.macos.yml @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +driver: + name: exec + +provisioner: + sudo: true + salt_install: bootstrap + salt_bootstrap_options: -P stable latest + salt_call_command: /opt/salt/bin/salt-call + +platforms: + - name: macos-12-latest-py3 + verifier: + inputs: + saltmajorversion: 3004 + - name: macos-11-latest-py3 + verifier: + inputs: + saltmajorversion: 3004 + - name: macos-1015-latest-py3 + verifier: + inputs: + saltmajorversion: 3004 diff --git a/test/integration/default/inspec.yml b/test/integration/default/inspec.yml index 777ca56..c566580 100644 --- a/test/integration/default/inspec.yml +++ b/test/integration/default/inspec.yml @@ -24,4 +24,5 @@ supports: - platform-name: gentoo - platform-name: almalinux - platform-name: rocky + - platform-name: mac_os_x - platform: windows