@@ -3,20 +3,27 @@ name: Testing python-mode
3
3
on :[push]
4
4
5
5
jobs :
6
- test-python-3_8 :
6
+ test :
7
7
runs-on :ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ python-version :["3.7", "3.8", "3.9", "3.10", "3.11"]
11
+ env :
12
+ PYTHON_CONFIGURE_OPTS :" --enable-shared"
8
13
steps :
9
- -uses :actions/checkout@v1
14
+ -uses :actions/checkout@v3
15
+ -name :Setup python ${{ matrix.python-version }}
16
+ uses :actions/setup-python@v4
17
+ with :
18
+ python-version :${{ matrix.python-version }}
10
19
-name :Install dependencies
11
20
run :|
12
21
sudo apt update
13
- export PYTHON_CONFIGURE_OPTS="--enable-shared"
14
- 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
22
+ 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
15
23
sudo apt remove --purge -yqq vim vim-runtime gvim
16
24
-name :build and install vim from source
17
25
working-directory :/tmp
18
26
run :|
19
- export PYTHON_CONFIGURE_OPTS="--enable-shared"
20
27
git clone https://github.com/vim/vim.git
21
28
cd vim
22
29
./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
36
43
git submodule update --init --recursive
37
44
git submodule sync
38
45
bash tests/test.sh
39
- test-python-3_9 :
40
- runs-on :ubuntu-latest
41
- steps :
42
- -uses :actions/checkout@v1
43
- -name :Install dependencies
44
- run :|
45
- sudo apt update
46
- export PYTHON_CONFIGURE_OPTS="--enable-shared"
47
- 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
48
- sudo apt remove --purge -yqq vim vim-runtime gvim
49
- -name :build and install vim from source
50
- working-directory :/tmp
51
- run :|
52
- export PYTHON_CONFIGURE_OPTS="--enable-shared"
53
- git clone https://github.com/vim/vim.git
54
- cd vim
55
- ./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
56
- sudo make && sudo make install
57
- -name :Install python-mode
58
- run :|
59
- export PYMODE_DIR="${HOME}/work/python-mode/python-mode"
60
- mkdir -p ${HOME}/.vim/pack/foo/start/
61
- ln -s ${PYMODE_DIR} ${HOME}/.vim/pack/foo/start/python-mode
62
- cp ${PYMODE_DIR}/tests/utils/pymoderc ${HOME}/.pymoderc
63
- cp ${PYMODE_DIR}/tests/utils/vimrc ${HOME}/.vimrc
64
- touch ${HOME}/.vimrc.before ${HOME}/.vimrc.after
65
- -name :Run python-mode test script
66
- run :|
67
- alias python=python3
68
- cd ${HOME}/work/python-mode/python-mode
69
- git submodule update --init --recursive
70
- git submodule sync
71
- bash tests/test.sh