Skip to content

Save

Save #327

Workflow file for this run

name: 'build'
on:
push:
pull_request:
branches: [ master ]
jobs:
bats-tests:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Test code
run: test/run
#vim-tests:
#strategy:
#matrix:
#neovim: [false, true]
#runs-on: ubuntu-latest
#steps:
#- uses: actions/checkout@v2
#- name: Setup vim or neovim
#uses: rhysd/action-setup-vim@v1
#id: vim
#with:
#neovim: ${{ matrix.neovim }}
#- name: Test vimscript
#env:
#CI_VIM_EXEC: ${{ steps.vim.outputs.executable }}
#run: test/run --vim-only
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup vim-vint
run: python3 -m pip install vim-vint==0.4a1
- name: Run vim-vint
run: vint --warning --verbose --enable-neovim src/nvim/**/*.vim
- name: Install shfmt
run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
- name: Install shellcheck
env:
scversion: stable # Or latest, vxx, etc
run: |
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv "shellcheck-${scversion}/shellcheck"
sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/
- name: Install pre-commit
run: python3 -m pip install pre-commit==2.3.0
- name: Run lint
run: ./lint.sh
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Install Ruby dependencies
run: bundle update --bundler && bundle install
- name: Run script
run: bashcov test/run
- name: Upload reports to Codecov
run: bash <(curl -s https://codecov.io/bash) -Z