Skip to content

ci: improve build matrix configuration, test with python3.13 and neovim-stable as well #178

ci: improve build matrix configuration, test with python3.13 and neovim-stable as well

ci: improve build matrix configuration, test with python3.13 and neovim-stable as well #178

Workflow file for this run

name: ci
on:
push:
pull_request:
branches:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.repository_owner == 'neovim' && github.sha || github.ref_name }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: 3.11
- name: install dependencies
run: python3 -m pip install tox tox-gh-actions
- name: checkqa
run: tox run -e checkqa,docs
test:
strategy:
fail-fast: false
matrix:
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.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.config.python-version }}
- name: install neovim (Linux/macOS)
if: runner.os != 'Windows'
run: |
set -eu -o pipefail
if [[ "$RUNNER_OS" == "Linux" ]]; then
BASE="nvim-linux64"
elif [[ "$RUNNER_OS" == "macOS" ]]; then
BASE="nvim-macos-x86_64"
else
echo "$RUNNER_OS not supported"; exit 1;
fi
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
# update $PATH for later steps
echo "$(pwd)/$BASE/bin" >> $GITHUB_PATH
- name: install neovim (Windows)
if: runner.os == 'Windows'
run: |
curl -LO "https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip"
unzip nvim-win64.zip
nvim-win64/bin/nvim --version
# update $PATH for later steps
echo "$(pwd)/nvim-win64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: install dependencies
run: |
python3 -m pip install -U pip
python3 -m pip install tox tox-gh-actions
- name: check neovim
run: |
python3 -m pip install -e . # install pynvim
nvim --headless --clean -c 'checkhealth | %+print | q'
- name: test with tox
run: |
echo $PATH
which nvim
which -a python3
python3 --version
tox run