GitHub Action to test installation of Pulsar via chocolatey #35
Workflow file for this 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
name: Chocolatey Test Installation | |
on: [ workflow_dispatch, pull_request] | |
jobs: | |
tests: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout the latest code | |
uses: actions/checkout@v3 | |
- name: Build Current Version | |
run: | | |
cd ./pulsar | |
choco pack | |
- name: Install Current Version | |
run: choco install pulsar --source . | |
- name: Put Pulsar On the PATH | |
run: | | |
"$env:LOCALAPPDATA\Programs\Pulsar\" >> $env:GITHUB_PATH | |
"$env:LOCALAPPDATA\Programs\Pulsar\resources\ppm\bin\" >> $env:GITHUB_PATH | |
- name: Ensure Installation was successful | |
id: pulsar-version | |
run: | | |
pulsar --version | | |
ConvertFrom-String -PropertyNames Application,Delimiter,Version | | |
Where-Object {$_.Application -eq "Pulsar" } | | |
Select-Object -Property @{n='version'; e={ return "$($PSItem.Application) $($PSItem.Version)" }} | |
).version >> $env:GITHUB_STEP_SUMMARY | |
- name: Just a check | |
run: echo $env:GITHUB_STEP_SUMMARY | |
- name: Write Comment | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
${{ github.env.GITHUB_STEP_SUMMARY }} |