Skip to content

Commit

Permalink
Merge pull request #135 from k-takata/use-github-actions
Browse files Browse the repository at this point in the history
CI: Use GitHub Actions
  • Loading branch information
k-takata authored Apr 21, 2021
2 parents fe5c664 + 478003f commit bf16892
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 77 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CI

on:
push:
pull_request:

jobs:
test:
strategy:
fail-fast: false
matrix:
vim_type: ['Vim', 'Neovim']
version: ['head', 'stable', 'oldest']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
download: ['available', 'never']

include:
- vim_type: 'Vim'
version: 'stable'
vim_version: 'v8.2.0000'

# minpac requires Vim v8.0.0050 or later.
- vim_type: 'Vim'
version: 'oldest'
vim_version: 'v8.0.0050'

exclude:
# minpac doesn't specify the oldest version for Neovim.
- vim_type: 'Neovim'
version: 'oldest'

# download == 'available' is preferred, but it doesn't work well on
# Ubuntu with Vim. (Appimage versions of Vim cause troubles because
# it changes LD_LIBRARY_PATH.)
- vim_type: 'Neovim'
download: 'never'
- vim_type: 'Vim'
os: 'ubuntu-latest'
download: 'available'
- vim_type: 'Vim'
os: 'macos-latest'
download: 'never'
- vim_type: 'Vim'
os: 'windows-latest'
download: 'never'

# FIXME: Neovim doesn't work on Ubuntu. Disable it for now.
- vim_type: 'Neovim'
os: 'ubuntu-latest'

runs-on: '${{ matrix.os }}'

steps:
- name: 'Checkout'
uses: 'actions/checkout@v2'

- name: 'Setup Vim'
id: 'vim'
uses: 'thinca/action-setup-vim@v1'
with:
vim_version: '${{ matrix.vim_version || matrix.version }}'
vim_type: '${{ matrix.vim_type }}'
download: '${{ matrix.download }}'

- name: 'Run test (Windows)'
if: ${{ startsWith(matrix.os, 'windows') }}
shell: cmd
run: |
rem # Show Vim version
${{ steps.vim.outputs.executable }} --version
rem # Set PATH for nmake
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set InstallDir=%%i
)
if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" (
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" amd64
)
rem # Run the tests
cd test
if "${{ matrix.vim_type }}"=="Neovim" (
nmake -f Make_win.mak VIMPROG=${{ steps.vim.outputs.executable }} NO_PLUGINS=--noplugin
) else (
nmake -f Make_win.mak VIMPROG=${{ steps.vim.outputs.executable }}
)
- name: 'Run test (Unix)'
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
# Show Vim version
${{ steps.vim.outputs.executable }} --version
# Run the tests
cd test
if [ '${{ matrix.vim_type }}' = 'Neovim' ]; then
make VIMPROG=${{ steps.vim.outputs.executable }} NO_PLUGINS='--noplugin'
else
make VIMPROG=${{ steps.vim.outputs.executable }}
fi
# vim: sw=2 sts=2 et
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/k-takata/minpac.svg?branch=master)](https://travis-ci.org/k-takata/minpac)
[![Build status](https://github.com/k-takata/minpac/workflows/CI/badge.svg)](https://github.com/k-takata/minpac/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/qakftqoyx5m47ns3/branch/master?svg=true)](https://ci.appveyor.com/project/k-takata/minpac/branch/master)

minpac: A minimal package manager for Vim 8 (and Neovim)
Expand Down
2 changes: 1 addition & 1 deletion test/Make_all.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Options for protecting the tests against undesirable interaction with the
# environment
NO_PLUGINS = --noplugin # --not-a-term
NO_PLUGINS = --noplugin --not-a-term
NO_INITS = -U NONE $(NO_PLUGINS)

# Individual tests.
Expand Down

0 comments on commit bf16892

Please sign in to comment.