-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
166 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,16 +28,17 @@ on: | |
default: 20 | ||
description: The timeout(in minutes) for the workflow | ||
|
||
env: | ||
machine_user: kitchen | ||
machine_pass: Password1 | ||
machine_port: 5985 | ||
KITCHEN_LOCAL_YAML: 'kitchen.windows.yml' | ||
## DGM env: | ||
## DGM machine_user: kitchen | ||
## DGM machine_pass: Password1 | ||
## DGM machine_port: 5985 | ||
## DGM KITCHEN_LOCAL_YAML: 'kitchen.windows.yml' | ||
|
||
jobs: | ||
Test: | ||
name: ${{ matrix.instance }} | ||
runs-on: ${{ inputs.runs-on }} | ||
## DGM runs-on: ${{ inputs.runs-on }} | ||
runs-on: windows-latest | ||
timeout-minutes: ${{ inputs.timeout }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -47,48 +48,50 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6.10 | ||
## ruby-version: 3.3.4 | ||
bundler-cache: true | ||
|
||
- name: Install Chef | ||
uses: actionshub/[email protected] | ||
with: | ||
project: chef | ||
version: 16.10.8 | ||
|
||
- name: Add Chef bindir to PATH | ||
uses: myci-actions/export-env-var-powershell@1 | ||
with: | ||
name: PATH | ||
value: "C:\\opscode\\chef\\bin;C:\\opscode\\chef\\embedded\\bin;$env:PATH" | ||
|
||
- name: Setup test user | ||
run: | | ||
$password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force | ||
New-LocalUser $env:machine_user -Password $password | ||
Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user | ||
Get-LocalUser | ||
Get-LocalGroupMember -Group "Administrators" | ||
## DGM - name: Setup Ruby | ||
## DGM uses: ruby/setup-ruby@v1 | ||
## DGM with: | ||
## DGM ruby-version: 2.6.10 | ||
## DGM ## ruby-version: 3.3.4 | ||
## DGM bundler-cache: true | ||
|
||
## DGM - name: Install Chef | ||
## DGM uses: actionshub/[email protected] | ||
## DGM with: | ||
## DGM project: chef | ||
## DGM version: 16.10.8 | ||
|
||
## DGM - name: Add Chef bindir to PATH | ||
## DGM uses: myci-actions/export-env-var-powershell@1 | ||
## DGM with: | ||
## DGM name: PATH | ||
## DGM value: "C:\\opscode\\chef\\bin;C:\\opscode\\chef\\embedded\\bin;$env:PATH" | ||
|
||
## DGM - name: Setup test user | ||
## DGM run: | | ||
## DGM $password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force | ||
## DGM New-LocalUser $env:machine_user -Password $password | ||
## DGM Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user | ||
## DGM Get-LocalUser | ||
## DGM Get-LocalGroupMember -Group "Administrators" | ||
|
||
- name: Set up WinRM | ||
run: | | ||
Set-WSManQuickConfig -Force | ||
winrm set winrm/config/service '@{AllowUnencrypted="True"}' | ||
env | ||
## DGM - name: Set up WinRM | ||
## DGM run: | | ||
## DGM Set-WSManQuickConfig -Force | ||
## DGM winrm set winrm/config/service '@{AllowUnencrypted="True"}' | ||
## DGM env | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Python Dependencies | ||
## DGM - name: Install Python Dependencies | ||
- name: Install Pytest | ||
run: | | ||
pip install -U pip | ||
pip install -r tests/requirements.txt | ||
## DGM pip install -U pip | ||
## DGM pip install -r tests/requirements.txt | ||
pip install -U pytest | ||
## DGM - name: Create Test Instance | ||
## DGM run: | | ||
|
@@ -107,6 +110,23 @@ jobs: | |
## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }} | ||
## DGM sleep 2 | ||
|
||
- 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: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.sw? | ||
*.un~ | ||
.vagrant | ||
*__pycache__ | ||
tools | ||
venv | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.