Skip to content

Add option to install specific version #11

Add option to install specific version

Add option to install specific version #11

name: Test Install Script
on:
pull_request:
paths:
- 'install.sh'
jobs:
test_install_script:
strategy:
matrix:
runner:
- ubuntu-24.04
- macos-14
version:
- '0.3.0'
- '0.4.0'
- ''
exclude:
- runner: macos-14
version: 0.3.0
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v4.2.2
- name: Setup JDK
uses: actions/setup-java@v4.6.0
with:
distribution: 'temurin'
java-version: 17
- name: install latest version
if: ${{ matrix.version == '' }}
run: sudo --preserve-env ./install.sh
env:
GH_TOKEN: ${{ github.token }}
- name: install specific version
if: ${{ matrix.version != '' }}
run: sudo --preserve-env ./install.sh --release-version ${{ matrix.version }}
env:
GH_TOKEN: ${{ github.token }}
- name: setup socket
run: |
sudo mkdir -p /var/run/kss/
sudo chmod a+w /var/run/kss/
- name: add timeout command to osx
if: ${{ startsWith(matrix.runner, 'macos') }}
run: |
brew install coreutils
sudo ln -s /usr/local/bin/gtimeout /usr/local/bin/timeout
- name: check install
# 124 is cancelled after timeout
run: |
timeout 5s kss || exit_code=$?
if [ "$exit_code" -ne 124 ]
then
echo "expected exit code 124 but was $exit_code"
exit "$exit_code"
fi