From a0b15a1a1bf01fdfda041ed6de6c313343398409 Mon Sep 17 00:00:00 2001 From: David Barnett Date: Thu, 8 Dec 2022 22:43:39 -0600 Subject: [PATCH] Add a workflow for running tests using GitHub Actions Also removes legacy .travis.yml. Note neovim mode is still hanging and timing out for some reason, so it's configured with a short timeout and continue-on-error for now. Also note older maktaba versions will be tested against neovim instead of vim because recent versions of vim 8.2+ fail to load any versions of maktaba older than google/vim-maktaba@92b8483abb. --- .github/workflows/run-tests.yml | 52 +++++++++++++++++++++++++++++++++ .travis.yml | 30 ------------------- 2 files changed, 52 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/run-tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..636c809 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,52 @@ +name: run-tests + +on: [push, pull_request] + +env: + VROOM_VERSION: 0.14.0 + +jobs: + run-tests: + strategy: + matrix: + os: [ubuntu-22.04] + vim-flavour: [vim, neovim] + maktaba-version: [master] + include: + - os: ubuntu-22.04 + vim-flavour: neovim + maktaba-version: 1.1.1 + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Install vim + if: ${{ matrix.vim-flavour == 'vim' }} + run: | + sudo apt update + sudo apt install vim vim-gtk xvfb + - name: Install neovim + if: ${{ matrix.vim-flavour == 'neovim' }} + run: | + sudo apt update + sudo apt install neovim python3-neovim xvfb + - name: Install vroom + run: | + wget https://github.com/google/vroom/releases/download/v${VROOM_VERSION}/vroom_${VROOM_VERSION}-1_all.deb + sudo dpkg -i ./vroom_${VROOM_VERSION}-1_all.deb + - name: Install plugin dependencies + run: | + git clone -b ${{ matrix.maktaba-version }} https://github.com/google/vim-maktaba.git ../maktaba/ + + - name: Run tests (vim) + if: ${{ matrix.vim-flavour == 'vim' }} + timeout-minutes: 10 + run: | + xvfb-run script -q -e -c 'vroom --crawl' + - name: Run tests (neovim) + if: ${{ matrix.vim-flavour == 'neovim' }} + timeout-minutes: 2 + run: | + xvfb-run script -q -e -c 'vroom --neovim --crawl' + continue-on-error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bdbbb79..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: generic -env: - global: - - VROOM_VERSION=0.14.0 - jobs: - # This Maktaba version should match the minimum required in bootstrap.vim. - - CI_TARGET=vim MAKTABA_VERSION=1.1.1 - - CI_TARGET=vim MAKTABA_VERSION=master - - CI_TARGET=neovim MAKTABA_VERSION=master -before_script: - - sudo apt-get update - - sudo apt-get install python3-dev - - if [ $CI_TARGET = vim ]; then - sudo apt-get install vim-gnome; - elif [ $CI_TARGET = neovim ]; then - eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64" && - wget https://bootstrap.pypa.io/get-pip.py && - sudo python3 get-pip.py && - sudo pip3 install neovim; - fi - - wget https://github.com/google/vroom/releases/download/v${VROOM_VERSION}/vroom_${VROOM_VERSION}-1_all.deb - - sudo dpkg -i ./vroom_${VROOM_VERSION}-1_all.deb - - git clone -b ${MAKTABA_VERSION} https://github.com/google/vim-maktaba.git ../maktaba/ -services: - - xvfb -script: - - '[ $CI_TARGET = neovim ] && VROOM_ARGS="--neovim" || VROOM_ARGS=""' - - vroom $VROOM_ARGS --crawl ./vroom/ -jobs: - fast_finish: true