Skip to content

Test in Ubuntu/Mac/Alpine #480

Test in Ubuntu/Mac/Alpine

Test in Ubuntu/Mac/Alpine #480

Workflow file for this run

name: Test
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
test-ubuntu:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt install expect
- name: Run hosty with sudo
run: sudo $GITHUB_WORKSPACE/hosty.sh
- name: Run hosty in debug mode
run: $GITHUB_WORKSPACE/hosty.sh -d
- name: Run hosty in debug mode with --ignore-default-sources
run: $GITHUB_WORKSPACE/hosty.sh -di
- name: Run hosty updater in debug mode
run: $GITHUB_WORKSPACE/updater.sh -d
- name: Run hosty installer answering n/n
run: expect -c "spawn $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"n\r\"; expect \"y/n\r\"; send -- \"n\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer without sudo and with cat
run: expect -c "spawn sh -c {cat $GITHUB_WORKSPACE/install.sh | sh}; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer without sudo
run: expect -c "spawn $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer with sudo
run: expect -c "spawn sudo $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty with --help
run: $GITHUB_WORKSPACE/hosty.sh -h
- name: Run hosty with --version
run: $GITHUB_WORKSPACE/hosty.sh -v
- name: Run hosty with --restore
run: sudo $GITHUB_WORKSPACE/hosty.sh -r
- name: Run hosty with --uninstall
run: sudo $GITHUB_WORKSPACE/hosty.sh -u
test-mac:
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Run hosty with sudo
run: sudo $GITHUB_WORKSPACE/hosty.sh
- name: Run hosty in debug mode
run: $GITHUB_WORKSPACE/hosty.sh -d
- name: Run hosty in debug mode with --ignore-default-sources
run: $GITHUB_WORKSPACE/hosty.sh -di
- name: Run hosty updater in debug mode
run: $GITHUB_WORKSPACE/updater.sh -d
- name: Run hosty installer answering n/n
run: expect -c "spawn $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"n\r\"; expect \"y/n\r\"; send -- \"n\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer without sudo and with cat
run: expect -c "spawn sh -c {cat $GITHUB_WORKSPACE/install.sh | sh}; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer without sudo
run: expect -c "spawn $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer with sudo
run: expect -c "spawn sudo $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty with --help
run: $GITHUB_WORKSPACE/hosty.sh -h
- name: Run hosty with --version
run: $GITHUB_WORKSPACE/hosty.sh -v
- name: Run hosty with --restore
run: sudo $GITHUB_WORKSPACE/hosty.sh -r
- name: Run hosty with --uninstall
run: sudo $GITHUB_WORKSPACE/hosty.sh -u
test-alpine:
runs-on: ubuntu-latest
container: alpine:latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install dependencies
run: apk add curl gnupg expect
- name: Run hosty without sudo
run: $GITHUB_WORKSPACE/hosty.sh
- name: Run hosty in debug mode
run: $GITHUB_WORKSPACE/hosty.sh -d
- name: Run hosty in debug mode with --ignore-default-sources
run: $GITHUB_WORKSPACE/hosty.sh -di
- name: Run hosty updater in debug mode
run: $GITHUB_WORKSPACE/updater.sh -d
- name: Run hosty installer answering n/n
run: expect -c "spawn $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"n\r\"; expect \"y/n\r\"; send -- \"n\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer without sudo and with cat
run: expect -c "spawn sh -c {cat $GITHUB_WORKSPACE/install.sh | sh}; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty installer without sudo
run: expect -c "spawn $GITHUB_WORKSPACE/install.sh; expect \"y/n\r\"; send -- \"y\r\"; expect \"y/n\r\"; send -- \"y\r\"; expect \"or 'never':\r\"; send -- \"daily\r\"; expect \"done.\r\"; expect eof"
- name: Run hosty with --help
run: $GITHUB_WORKSPACE/hosty.sh -h
- name: Run hosty with --version
run: $GITHUB_WORKSPACE/hosty.sh -v
- name: Run hosty with --restore
run: $GITHUB_WORKSPACE/hosty.sh -r
- name: Run hosty with --uninstall
run: $GITHUB_WORKSPACE/hosty.sh -u