Skip to content

GitHub Action to test installation of Pulsar via chocolatey #42

GitHub Action to test installation of Pulsar via chocolatey

GitHub Action to test installation of Pulsar via chocolatey #42

Workflow file for this run

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\" | Out-File -Append -FilePath $env:GITHUB_PATH
"$env:LOCALAPPDATA\Programs\Pulsar\resources\ppm\bin\" | Out-File -Append -FilePath $env:GITHUB_PATH
- name: Ensure Installation was successful
id: pulsar-version
run: |
$version = pulsar --version |
ConvertFrom-String -PropertyNames Application, Delimiter, Version |
Where-Object { $PSItem.Application -eq "Pulsar" } |
Select-Object -ExpandProperty version
Write-Host "pulsarVersion=`"$($version)`"" | Out-File -Append -FilePath $env:GITHUB_ENV
- name: Just a check
run: echo '${{ env.pulsarVersion }}'
- name: Write Comment
uses: thollander/actions-comment-pull-request@v2
with:
message: "Pulsar Version: ${{ env.pulsarVersion }}"