Python 3.13 support: add CI, fix failing tests, etc #160
Workflow file for this run
This file contains hidden or 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: "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" | |
| os: ubuntu-latest | |
| - python-version: "3.13" | |
| 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: | | |
| python3 --version | |
| - name: Enforce code style | |
| run: | | |
| pip install yapf isort | |
| yapf --recursive --diff semshi/ test/ | |
| isort --check-only --diff semshi/ test/ | |
| if: ${{ matrix.python-version == '3.11' }} | |
| - 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-linux-x86_64.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 | |
| python3 -m pip install 'pynvim @ git+https://github.com/neovim/pynvim.git' | |
| else | |
| python3 -m pip install pynvim | |
| fi | |
| python3 -c 'import pynvim; print("__version__ =", pynvim.__version__)' | |
| python3 -c 'import pynvim; print(pynvim.__file__)' | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Check neovim version | |
| run: | | |
| nvim --version | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install pytest codecov pytest-cov | |
| - name: Run tests | |
| run: | | |
| pytest -xsv --cov semshi/ --cov-report term-missing:skip-covered --ignore test/test_fuzz.py test/ | |
| - name: Test coverage | |
| run: codecov | |