Skip to content

Bump the gh-actions group with 2 updates #195

Bump the gh-actions group with 2 updates

Bump the gh-actions group with 2 updates #195

Workflow file for this run

name: (Neo)vim
on:
push:
branches-ignore:
- master
- 'dependabot/**'
pull_request:
branches:
- master
permissions:
contents: read
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'test/requirements.txt'
- name: Install
run: |
# https://github.com/actions/setup-python/issues/842
pip install --upgrade --force pip setuptools
pip install -r test/requirements.txt
pip install vim-vint
- name: Lint
run: vint autoload ftplugin plugin -wt
- name: Run python tests
run: coverage run -m pytest -v && coverage xml -o pytest.xml
- name: Upload coverage report
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de #v5.5.2
with:
files: ./pytest.xml
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
build:
needs: coverage
runs-on: ubuntu-22.04
strategy:
matrix:
vim-version: [v8.1.2269, v8.2.4049, v9.0.0304, master]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
env:
LOG: python-${{ matrix.python-version }}-bench.log
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'test/requirements.txt'
- name: Install latest pip
run: |
pip install --upgrade pip
- name: Install python modules
run: pip install -r test/requirements.txt
- name: Set up plugin test environment
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: blueyed/vader.vim
ref: display-source-with-exceptions
path: vader.vim
persist-credentials: false
fetch-depth: 1
- name: Install neovim (current stable)
if: ${{ !(endsWith(matrix.python-version, '7') || endsWith(matrix.python-version, '8')) }}
uses: rhysd/action-setup-vim@19e3dd31a84dbc2c5445d65e9b363f616cab96c1 # v1.6.0
id: neovim-stable
with:
neovim: true
version: stable
- name: Install a neovim version supporting Python < 3.9
if: ${{ endsWith(matrix.python-version, '7') || endsWith(matrix.python-version, '8') }}
uses: rhysd/action-setup-vim@19e3dd31a84dbc2c5445d65e9b363f616cab96c1 # v1.6.0
id: neovim-oldstable
with:
neovim: true
version: 'v0.11.0'
- name: Test plugin on vim ${{ matrix.vim-version }}
if: ${{ startsWith(matrix.python-version, '3.8') }}
run: |
git clone --branch ${VIM_RELEASE} https://github.com/vim/vim.git vim-src
pushd vim-src
git grep -l '# undef _POSIX_THREADS' | xargs -I% sed -i '/# undef _POSIX_THREADS/d' %
CFLAGS=-D_POSIX_THREADS ./configure --prefix=/usr/local --with-features=normal \
--enable-python3interp=dynamic \
--with-python3-config-dir=$(find $Python_ROOT_DIR -iname Makefile | xargs dirname)
make && sudo make install && popd
/usr/local/bin/vim --startuptime vim_bench.log -ENsu test/vimrc -c '+Vader! test/vader/*' > /dev/null
.github/scripts/collect_start_times vim vim-${VIM_RELEASE}-${LOG}
env:
VIM_RELEASE: ${{ matrix.vim-version }}
- name: Test plugin on current stable neovim
if: ${{ !(endsWith(matrix.python-version, '7') || endsWith(matrix.python-version, '8')) }}
run: |
"${NVIM}" --startuptime nvim_bench.log -ENsu test/vimrc -c '+Vader! test/vader/**/*.vader' > /dev/null
env:
NVIM: ${{ steps.neovim-stable.outputs.executable }}
- name: Test plugin on neovim's legacy python providers
if: ${{ endsWith(matrix.python-version, '7') || endsWith(matrix.python-version, '8') }}
run: |
"${NVIM}" --startuptime nvim_bench.log -ENsu test/vimrc -c '+Vader! test/vader/**/*.vader' > /dev/null
env:
NVIM: ${{ steps.neovim-oldstable.outputs.executable }}
- name: Check neovim startup times
run: |
.github/scripts/collect_start_times nvim neovim-$LOG
- name: Save startup times
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: plugin-load-stats@vim-${{ matrix.vim-version }}-py-${{ matrix.python-version }}
path: '**/*python*.log'
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: plugin-load-stats
delete-merged: true