salt-bootstrap/.github/workflows/test-windows.yml

82 lines
2 KiB
YAML

name: Test Windows
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 Windows 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
jobs:
Test:
name: ${{ matrix.instance }}
runs-on: windows-latest
timeout-minutes: ${{ inputs.timeout }}
strategy:
fail-fast: false
matrix:
instance: ${{ fromJSON(inputs.instances) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Pytest
run: |
pip install -U pytest
- name: Bootstrap Salt
run: |
. ./bootstrap-salt.ps1 -RunService $false
- name: Set Environment Variables
run: |
$env:Path = "$env:Path;C:\Program Files\Salt Project\Salt"
$env:Instance = ${{ matrix.instance }}
Write-Output "Path:"
Write-Output $env:Path
Write-Output "Environment Variables"
Get-ChildItem Env:
- name: Test Bootstrap
run: |
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
- 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@v4
with:
name: exitstatus-${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
path: exitstatus/