Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Test more python versions #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 12 additions & 38 deletions .github/workflows/test_pymode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,27 @@ name: Testing python-mode
on: [push]

jobs:
test-python-3_8:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
env:
PYTHON_CONFIGURE_OPTS: "--enable-shared"
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
export PYTHON_CONFIGURE_OPTS="--enable-shared"
sudo apt install -yqq libncurses5-dev libgtk2.0-dev libatk1.0-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python3-dev lua5.2 liblua5.2-dev libperl-dev git
sudo apt install -yqq libncurses5-dev libgtk2.0-dev libatk1.0-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev lua5.2 liblua5.2-dev libperl-dev git
sudo apt remove --purge -yqq vim vim-runtime gvim
- name: build and install vim from source
working-directory: /tmp
run: |
export PYTHON_CONFIGURE_OPTS="--enable-shared"
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge --enable-multibyte --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.8/config-3.8m-x86_64-linux-gnu --enable-perlinterp=yes --enable-luainterp=yes --enable-cscope --prefix=/usr/local
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to utilize the ${{ matrix.python-version }} here as well as the setup-python action

Expand All @@ -36,36 +43,3 @@ jobs:
git submodule update --init --recursive
git submodule sync
bash tests/test.sh
test-python-3_9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt update
export PYTHON_CONFIGURE_OPTS="--enable-shared"
sudo apt install -yqq libncurses5-dev libgtk2.0-dev libatk1.0-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python3-dev lua5.2 liblua5.2-dev libperl-dev git
sudo apt remove --purge -yqq vim vim-runtime gvim
- name: build and install vim from source
working-directory: /tmp
run: |
export PYTHON_CONFIGURE_OPTS="--enable-shared"
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge --enable-multibyte --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.9/config-3.9m-x86_64-linux-gnu --enable-perlinterp=yes --enable-luainterp=yes --enable-cscope --prefix=/usr/local
sudo make && sudo make install
- name: Install python-mode
run: |
export PYMODE_DIR="${HOME}/work/python-mode/python-mode"
mkdir -p ${HOME}/.vim/pack/foo/start/
ln -s ${PYMODE_DIR} ${HOME}/.vim/pack/foo/start/python-mode
cp ${PYMODE_DIR}/tests/utils/pymoderc ${HOME}/.pymoderc
cp ${PYMODE_DIR}/tests/utils/vimrc ${HOME}/.vimrc
touch ${HOME}/.vimrc.before ${HOME}/.vimrc.after
- name: Run python-mode test script
run: |
alias python=python3
cd ${HOME}/work/python-mode/python-mode
git submodule update --init --recursive
git submodule sync
bash tests/test.sh