diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 027e002..f7e0950 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 083a199..b411900 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,4 +25,4 @@ jobs: uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - name: Check workflow files - uses: reviewdog/action-actionlint@42de1e3a0f52d5f8b8390894de87bc603844e530 + uses: reviewdog/action-actionlint@7485c2136bd093d2317a854c72910eebaee35238 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2952edb..b53dca8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/test-salt-windows.yml b/.github/workflows/test-salt-windows.yml new file mode 100644 index 0000000..eb739b2 --- /dev/null +++ b/.github/workflows/test-salt-windows.yml @@ -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 + 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5863ef4..e08d617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Dockerfile b/Dockerfile index abbcc61..125a5f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM plus3it/tardigrade-ci:0.24.6 +FROM plus3it/tardigrade-ci:0.24.7