diff --git a/.github/workflows/basictestrun.yml b/.github/workflows/basictestrun.yml new file mode 100644 index 0000000..c6b1785 --- /dev/null +++ b/.github/workflows/basictestrun.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. diff --git a/.travis.yml b/.travis.yml index 2973be3..3993d66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,42 @@ dist: trusty +sudo: required + +matrix: + include: + - os: linux + - env: OS_TYPE=fedora + - env: INSTALL_REQUIREMENTS="dnf repolist; dnf install -y perl shellcheck devscripts sudo wget" + + - os: linux + - env: OS_TYPE=opensuse + - env: INSTALL_REQUIREMENTS="zypper refresh; zypper in -y perl shellcheck devscripts sugo wget" + + - os: linux + - env: OS_TYPE=dauchida/freebsd + - env: INSTALL_REQUIREMENTS="pkg install -y perl shellcheck devscripts sudo wget" + + - os: linux + - env: OS_TYPE=debian:11 + - env: INSTALL_REQUIREMENTS="sudo apt-get update -qq; sudo apt-get upgrade -y; sudo apt-get install -y -qq perl shellcheck devscripts sudo wget" + + - os: linux + - env: OS_TYPE=ubuntu:22.04 + - env: INSTALL_REQUIREMENTS="sudo apt-get update -qq; sudo apt-get upgrade -y; sudo apt-get install -y -qq perl shellcheck devscripts sudo wget" + + - os: osx + - env: OS_TYPE=osx + - env: INSTALL_REQUIREMENTS="brew update; brew install perl shellcheck devscripts sudo wget" + before_install: -- sudo apt-get update -qq -- sudo apt-get install -qq perl shellcheck devscripts -script: prove + - [[ $TRAVIS_OS_NAME == "linux" ]] && docker pull ${OS_TYPE} + +install: + - [[ $TRAVIS_OS_NAME == "osx" ]] && docker run -d $OS /bin/sh -c "$INSTALL_REQUIREMENTS" + - [[ $TRAVIS_OS_NAME == "linux" ]] && docker run -d $OS /bin/sh -c "$INSTALL_REQUIREMENTS" + - docker run -d $OS /bin/sh -c "sudo wget https://github.com/EspaceNetworks/virtualmin-install/raw/master/virtualmin-install.sh" + - docker run -d $OS /bin/sh -c "sudo chmod +x virtualmin-install.sh" + +script: + # Test for osx and run different build or prep commands: + - [[ $TRAVIS_OS_NAME == "osx" ]] && docker run -d $OS /bin/sh -c "prove" && docker run -d $OS /bin/sh -c "./virtualmin-install.sh" + - [[ $TRAVIS_OS_NAME == "linux" ]] && docker run -d $OS /bin/sh -c "prove"&& docker run -d $OS /bin/sh -c "./virtualmin-install.sh"