mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-10 06:41:41 +00:00
93 lines
2.3 KiB
YAML
93 lines
2.3 KiB
YAML
name: Test Linux
|
|
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
|
|
|
|
instances:
|
|
type: string
|
|
required: true
|
|
description: The Instances To Test
|
|
|
|
timeout:
|
|
type: number
|
|
required: false
|
|
default: 20
|
|
|
|
|
|
jobs:
|
|
Test:
|
|
name: ${{ matrix.instance }}
|
|
runs-on: ubuntu-20.04
|
|
timeout-minutes: ${{ inputs.timeout }}
|
|
strategy:
|
|
max-parallel: 2
|
|
fail-fast: false
|
|
matrix:
|
|
instance: ${{ fromJSON(inputs.instances) }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
## DGM Need to replace this
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
## DGM ruby-version: 3.2.3
|
|
ruby-version: 2.6.10
|
|
bundler-cache: true
|
|
|
|
## DGM - name: Set up Python 3.9
|
|
## DGM uses: actions/setup-python@v4
|
|
## DGM with:
|
|
## DGM python-version: 3.9
|
|
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
python3 -m pip install -U pip
|
|
python3 -m pip install -r tests/requirements.txt
|
|
|
|
- name: Create Test Instance
|
|
run: |
|
|
## DGM Need to replace this
|
|
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
|
|
sleep 2
|
|
|
|
- name: Test Bootstrap
|
|
run: |
|
|
## DGM Need to replace this
|
|
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
|
sleep 2
|
|
|
|
- name: Destroy Test Instance
|
|
if: always()
|
|
run: |
|
|
## DGM Need to replace this
|
|
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
|
sleep 2
|
|
|
|
- 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
|