Skip to content

refactor: format the entire codebase using isort and yapf. #134

refactor: format the entire codebase using isort and yapf.

refactor: format the entire codebase using isort and yapf. #134

Workflow file for this run

name: "Run Tests"
on: [push, pull_request, workflow_dispatch]
jobs:
unit-tests:
name: "Unit Tests"
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
include:
- python-version: "3.7"
os: ubuntu-22.04
- python-version: "3.8"
os: ubuntu-latest
- python-version: "3.9"
os: ubuntu-latest
- python-version: "3.10"
os: ubuntu-latest
- python-version: "3.11"
os: ubuntu-latest
- python-version: "3.12-dev"
os: ubuntu-latest
neovim-version: nightly
PYNVIM_MASTER: true
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install -U pip
- name: Configure environments
run: |
python --version
- name: Setup neovim
run: |
sudo apt install libfuse2
NVIM_VERSION="${{ matrix.neovim-version }}"
if [ -z "$NVIM_VERSION" ]; then
NVIM_VERSION="stable"
fi
NVIM_DOWNLOAD_URL="https://github.com/neovim/neovim/releases/download/${NVIM_VERSION}/nvim.appimage"
mkdir -p $HOME/.local/bin
wget -O $HOME/.local/bin/nvim $NVIM_DOWNLOAD_URL
chmod +x $HOME/.local/bin/nvim
if [ -n "${{ matrix.PYNVIM_MASTER }}" ]; then
pip install 'pynvim @ git+https://github.com/neovim/pynvim.git'
else
pip install pynvim
fi
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check neovim version
run: |
nvim --version
- name: Install dependencies
run: |
pip install pytest codecov pytest-cov
pip install pyproject-flake8
- name: Linting
run: |
pflake8 semshi/
# pylint semshi/
if: ${{ matrix.python-version == '3.11' }}
- name: Run tests
run: |
pytest -v --cov semshi/ --cov-report term-missing:skip-covered --ignore test/test_fuzz.py test/
- name: Test coverage
run: codecov