Add manifest verification step to all Action-Test jobs #997
Workflow file for this run
This file contains hidden or 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
| name: Action-Test | ||
|
Check failure on line 1 in .github/workflows/Action-Test.yml
|
||
| run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| permissions: {} | ||
| jobs: | ||
| ActionTestDefault: | ||
| name: Action-Test - [Default] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Action-Test | ||
| uses: ./ | ||
| with: | ||
| Name: PSModuleTest | ||
| Version: 1.0.0 | ||
| ArtifactName: PSModuleTestDefault | ||
| WorkingDirectory: tests/srcTestRepo | ||
| - name: Verify manifest | ||
| shell: pwsh | ||
| run: | | ||
| $manifest = Import-PowerShellDataFile 'tests/srcTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | ||
| if ($manifest.ModuleVersion -ne '1.0.0') { | ||
| throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'" | ||
| } | ||
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" | ||
| name: Action-Test - [Minimal] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Action-Test | ||
| uses: ./ | ||
| with: | ||
| Name: PSModuleTest | ||
| Version: 1.0.0 | ||
| ArtifactName: PSModuleTestMinimal | ||
| WorkingDirectory: tests/srcMinimalTestRepo | ||
| - name: Verify manifest | ||
| shell: pwsh | ||
| run: | | ||
| $manifest = Import-PowerShellDataFile 'tests/srcMinimalTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | ||
| if ($manifest.ModuleVersion -ne '1.0.0') { | ||
| throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'" | ||
| } | ||
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" | ||
| ActionTestWithManifest: | ||
| name: Action-Test - [DefaultWithManifest] | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Action-Test | ||
| uses: ./ | ||
| with: | ||
| Name: PSModuleTest | ||
| Version: 1.0.0 | ||
| ArtifactName: PSModuleTestWithManifest | ||
| WorkingDirectory: tests/srcWithManifestTestRepo | ||
| - name: Verify manifest | ||
| shell: pwsh | ||
| run: | | ||
| $manifest = Import-PowerShellDataFile 'tests/srcWithManifestTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1' | ||
| if ($manifest.ModuleVersion -ne '1.0.0') { | ||
| throw "Expected ModuleVersion '1.0.0' but got '$($manifest.ModuleVersion)'" | ||
| } | ||
| Write-Host "ModuleVersion: $($manifest.ModuleVersion)" | ||