Skip to content

Commit

Permalink
Merge pull request #18 from lorengordon/feat/add-salt-windows-test
Browse files Browse the repository at this point in the history
  • Loading branch information
lorengordon authored Jun 26, 2023
2 parents 2604a33 + bb6620e commit 84885d2
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.2.1
current_version = 1.3.0
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Check workflow files
uses: reviewdog/action-actionlint@42de1e3a0f52d5f8b8390894de87bc603844e530
uses: reviewdog/action-actionlint@7485c2136bd093d2317a854c72910eebaee35238
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882
- run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882

- name: Test release condition
id: release
Expand All @@ -66,7 +66,7 @@ jobs:
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
name: ${{ steps.release.outputs.version }}
tag_name: ${{ steps.release.outputs.version }}
tag_name: ${{ steps.release.outputs.version }}
generate_release_notes: true
target_commitish: ${{ env.GITHUB_REF }}
target_commitish: ${{ github.sha }}
token: ${{ secrets.release-token }}
67 changes: 67 additions & 0 deletions .github/workflows/test-salt-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run salt formula tests on Windows

on:
workflow_call:
inputs:
salt-os-version:
description: Github Windows runner to run the tests on, see <https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources>
required: true
type: string
salt-state:
description: Salt state to execute
required: true
type: string
salt-pillar-root:
description: Relative paths to the salt pillar to test
default: ''
type: string
salt-installer-url:
description: URL to the salt installer
default: https://repo.saltproject.io/salt/py3/windows/minor/3006.1/Salt-Minion-3006.1-Py3-AMD64-Setup.exe
type: string

jobs:
test:
runs-on: ${{ inputs.salt-os-version}}
steps:
- name: Clone this git repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

# Install salt
- run: >
(new-object net.webclient).DownloadFile(
"${{ inputs.salt-installer-url }}",
"${env:temp}\salt-minion-installer.exe" )
shell: pwsh
- run: >
Start-Process -FilePath "${env:temp}\salt-minion-installer.exe"
-ArgumentList @("/S", "/install-dir=c:\salt")
-NoNewWindow -PassThru -Wait
shell: pwsh
- run: C:\salt\salt-call.exe --versions-report
shell: pwsh

# Sync custom salt modules, if any
- run: >
C:\salt\salt-call.exe --local --retcode-passthrough
--log-file-level debug
--file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }}
saltutil.sync_all
shell: pwsh
# Run tests
- run: >
C:\salt\salt-call.exe --local --retcode-passthrough
--log-file-level debug
--file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }}
state.show_sls
"${{ inputs.salt-state }}"
shell: pwsh
- run: >
C:\salt\salt-call.exe --local --retcode-passthrough
--log-file-level debug
--file-root="${{ github.workspace }}" --pillar-root=${{ inputs.salt-pillar-root }}
state.sls
"${{ inputs.salt-state }}"
mock=True
shell: pwsh
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,29 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### [1.3.0](https://github.com/plus3it/actions-workflows/releases/tag/1.3.0)

**Released**: 2023.06.26

**Summary**:

* Adds reusable workflow for testing salt formulas on Windows

### [1.2.1](https://github.com/plus3it/actions-workflows/releases/tag/1.2.1)

**Released**: 2023.06.20

**Summary**:

* Improves the logic getting the current version to avoid multiple returns

### [1.2.0](https://github.com/plus3it/actions-workflows/releases/tag/1.2.0)

**Released**: 2023.05.22

**Summary**:

* Adds reusable workflow for testing salt formulas
* Adds reusable workflow for testing salt formulas on Linux

### [1.1.0](https://github.com/plus3it/actions-workflows/releases/tag/1.1.0)

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM plus3it/tardigrade-ci:0.24.6
FROM plus3it/tardigrade-ci:0.24.7

0 comments on commit 84885d2

Please sign in to comment.