Skip to content

Commit

Permalink
Merge #586 ci: python3.13, neovim-stable #586
Browse files Browse the repository at this point in the history
ci: improve build matrix configuration, test with python3.13 and neovim-stable as well
  • Loading branch information
justinmk authored Jan 7, 2025
2 parents 63a0250 + c3fe993 commit 65c0802
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
43 changes: 19 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,30 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
exclude:
- os: 'ubuntu-latest'
python-version: '3.7'
- os: 'macos-latest'
python-version: '3.7'
- os: 'macos-latest'
python-version: '3.8'
- os: 'macos-latest'
python-version: '3.9'
include:
- os: 'ubuntu-20.04'
python-version: '3.7'
- os: 'macos-12'
python-version: '3.7'
- os: 'macos-12'
python-version: '3.8'
- os: 'macos-12'
python-version: '3.9'
config: [
{ python-version: '3.13', neovim-version: 'nightly' },
{ python-version: '3.12', neovim-version: 'nightly' },
{ python-version: '3.12', neovim-version: 'stable' },
{ python-version: '3.11' },
{ python-version: '3.10' },
# for python 3.7~3.9, use older version of OS (ubuntu-20.04 and macos-12)
{ python-version: '3.9', ubuntu: '20.04', macos: '13' },
{ python-version: '3.8', ubuntu: '20.04', macos: '13' },
{ python-version: '3.7', ubuntu: '20.04', macos: '13' },
]
os: ['ubuntu', 'macos', 'windows']

name: "test (python ${{ matrix.python-version }}, ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
name:
test (python ${{ matrix.config.python-version }},
${{ matrix.config.neovim-version || 'nightly' }},
${{ matrix.os }}-${{ matrix.config[matrix.os] || 'latest' }})
runs-on: ${{ matrix.os }}-${{ matrix.config[matrix.os] || 'latest' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.config.python-version }}

- name: install neovim (Linux/macOS)
if: runner.os != 'Windows'
Expand All @@ -70,7 +65,7 @@ jobs:
echo "$RUNNER_OS not supported"; exit 1;
fi
curl -LO "https://github.com/neovim/neovim/releases/download/nightly/${BASE}.tar.gz"
curl -LO "https://github.com/neovim/neovim/releases/download/${{ matrix.config.neovim-version || 'nightly' }}/${BASE}.tar.gz"
tar xzf "${BASE}.tar.gz"
echo "RUNNER_OS = $RUNNER_OS"
$BASE/bin/nvim --version
Expand Down
7 changes: 6 additions & 1 deletion test/test_events.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import pytest

from pynvim.api import Nvim


Expand Down Expand Up @@ -37,6 +38,10 @@ def test_async_error(vim: Nvim) -> None:


def test_broadcast(vim: Nvim) -> None:
if (vim.version.major, vim.version.minor) < (0, 11):
# see #570, neovim/neovim#28487
pytest.skip("neovim/neovim#28487")

vim.command('call rpcnotify(0, "event1", 1, 2, 3)')
vim.command('call rpcnotify(0, "event2", 4, 5, 6)')
vim.command('call rpcnotify(0, "event2", 7, 8, 9)')
Expand Down

0 comments on commit 65c0802

Please sign in to comment.