Migrate tests to GitHub actions #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Run tests on Linux | |
if: runner.os == 'Linux' # headless execution is required on Linux | |
run: | | |
bundle list | |
xvfb-run bundle exec rake ci | |
- name: Run tests on ${{ matrix.os }} | |
if: runner.os != 'Linux' | |
run: | | |
bundle exec rake ci |