Skip to content

Lint and Test

Lint and Test #4

Workflow file for this run

name: Lint and Test
on:
workflow_dispatch: # Enables manual triggering
push:
paths:
- 'python/plugin.py'
- 'plugin/wordnet-cmp.vim'
pull_request:
paths:
- 'python/plugin.py'
- 'plugin/wordnet-cmp.vim'
jobs:
python-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest wn
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with pylint
run: |
pylint python/plugin.py --count --max-complexity=10 --max-line-length=100 --statistics
- name: Test with pytest
run: |
pytest python/plugin.py
vim-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install vint
run: |
python -m pip install --upgrade pip
pip install vim-vint
- name: Lint Vim script
run: |
vint plugin/wordnet-cmp.vim