Lint and Test #4
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
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 |