mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00

* Updating the bootstrap script with fixes to install properly on SUSE. Since we are not building onedir packages and providing them in the Salt project repo, we fall back to the previous stable installs and use the SUSE repos. Removing _DOWNSTREAM_PKG_REPO as it is no longer used. * Gentoo installs are broken because of the Gentoo ebuild. Remove Mac 10.15 as it is EOL. Update BSD tests tor run on MacOS 11. * If the brew update vagrant fails because it is not installed then install it. * blacklist gentoo from latest packages. * Make sure virtualbox is installed * removing cask argument * swap macos-11 for macos-12 to run BSD tests in vagrant.
102 lines
2.7 KiB
YAML
102 lines
2.7 KiB
YAML
name: Test FreeBSD & OpenBSD
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
distro-slug:
|
|
type: string
|
|
required: true
|
|
description: The Distribution Slug
|
|
|
|
display-name:
|
|
type: string
|
|
required: true
|
|
description: The Display Name For The Job
|
|
|
|
runs-on:
|
|
type: string
|
|
required: true
|
|
description: The GitHub MacOS Worker To Run Workflow On
|
|
|
|
instances:
|
|
type: string
|
|
required: true
|
|
description: The Instances To Test
|
|
|
|
timeout:
|
|
type: number
|
|
required: false
|
|
default: 20
|
|
description: The timeout(in minutes) for the workflow
|
|
|
|
env:
|
|
VAGRANT_HOME: '${{ github.workspace }}/.vagrant.d'
|
|
KITCHEN_LOCAL_YAML: 'kitchen.bsd.yml'
|
|
|
|
jobs:
|
|
Test:
|
|
name: ${{ matrix.instance }}
|
|
runs-on: ${{ inputs.runs-on }}
|
|
timeout-minutes: ${{ inputs.timeout }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
instance: ${{ fromJSON(inputs.instances) }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.6.10
|
|
bundler-cache: true
|
|
|
|
- name: Update Vagrant
|
|
run: |
|
|
brew update
|
|
brew upgrade vagrant || brew install vagrant
|
|
|
|
- name: Setup Vagrant Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
${{ github.workspace }}/.kitchen
|
|
${{ github.workspace }}/.vagrant.d/
|
|
key: "${{ runner.os }}|vagrant|${{ inputs.distro-slug }}|${{ hashFiles('Gemfile', '.github/workflows/test-bsd.yml', 'kitchen.bsd.yml') }}"
|
|
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
pip install -U pip
|
|
pip install -r tests/requirements.txt
|
|
|
|
- name: Create Test Instance
|
|
run: |
|
|
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
|
|
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
|
|
|
|
- name: Test Bootstrap
|
|
run: |
|
|
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
|
|
|
- name: Destroy Test Instance
|
|
if: always()
|
|
run: |
|
|
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
|
|
|
- name: Set Exit Status
|
|
if: always()
|
|
run: |
|
|
mkdir exitstatus
|
|
echo "${{ job.status }}" > exitstatus/${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
|
|
|
- name: Upload Exit Status
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: exitstatus
|
|
path: exitstatus
|