Skip to content

Test install

Test install #8

Workflow file for this run

name: Test install
on:
workflow_run:
workflows: ['On release']
types:
- completed
permissions:
contents: read
pull-requests: read
jobs:
test_macos_homebrew:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Get version
run: |
VERSION=$(jq -r .version package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install Heta Compiler
run: |
echo "Installing latest Heta Compiler"
brew tap hetalang/heta-compiler
brew install heta-compiler
- name: Check version
run: |
echo "Checking installed version"
if [[ "$(heta --version)" != *"$VERSION"* ]]; then
echo "Version mismatch: expected $VERSION, got $(heta --version)"
exit 1
else
echo "heta-compiler installed and version OK: $VERSION"
fi
test_linux_debian:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
run: |
VERSION=$(jq -r .version package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install Heta Compiler
run: |
wget https://github.com/hetalang/heta-compiler/releases/latest/download/heta-compiler-x64.deb
sudo dpkg -i heta-compiler-x64.deb
- name: Check version
run: |
echo "Checking installed version"
if [[ "$(heta --version)" != *"$VERSION"* ]]; then
echo "Version mismatch: expected $VERSION, got $(heta --version)"
exit 1
else
echo "heta-compiler installed and version OK: $VERSION"
fi
test_windows_chocolatey:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Get version
shell: bash
run: |
VERSION=$(jq -r .version package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install Heta Compiler
run: |
echo "Installing latest Heta Compiler"
choco install heta-compiler --version=$VERSION -y
- name: Check version
shell: bash
run: |
if [[ "$(heta --version)" != *"$VERSION"* ]]; then
echo "Version mismatch: expected $VERSION, got $(heta --version)"
exit 1
else
echo "heta-compiler installed and version OK: $VERSION"
fi