Skip to content

Create GA: tests.yml (#20) #40

Create GA: tests.yml (#20)

Create GA: tests.yml (#20) #40

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
name: "test on ${{ matrix.os }} ; ${{ matrix.neovim && 'neovim' || 'vim' }}"
strategy:
matrix:
# Testing doesn't seem to work on Windows: output log file
# cannot be read...
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
neovim: [false, true]
# TODO: Test different flavours of Vim...
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup Vim
uses: rhysd/action-setup-vim@v1
# uses: thinca/action-setup-vim@v2
id: vim
with:
neovim: ${{matrix.neovim }}
configure-args: |
--with-features=huge
- name: Install vim plugin dependencies
# Manually install UT -- without vim-flavor which will install
# lh-vim-lib a second time and create conflicts...
run: |
mkdir -p ~/.vim/pack/flavors/start
git clone https://github.com/LucHermitte/vim-UT ~/.vim/pack/flavors/start/UT
- name: Run tests on Linux
if: runner.os == 'Linux' # headless execution is required on Linux
run: |
xvfb-run bundle exec rake test
- name: Run tests on ${{ matrix.os }}
if: runner.os != 'Linux'
run: |
bundle exec rake test