Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1811237

Browse files
committed
Update the CI to run tests using docker
1 parent2287a05 commit1811237

File tree

1 file changed

+40
-65
lines changed

1 file changed

+40
-65
lines changed

‎.github/workflows/test_pymode.yml‎

Lines changed: 40 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,46 @@
11
name:Testing python-mode
22

3-
on:[push]
3+
on:
4+
push:
5+
branches:[main, master, develop]
6+
pull_request:
7+
branches:[main, master, develop]
48

59
jobs:
6-
test-python-3_8:
10+
test-python-versions:
711
runs-on:ubuntu-latest
12+
strategy:
13+
matrix:
14+
python_version:
15+
-short:"3.10"
16+
full:"3.10.13"
17+
-short:"3.11"
18+
full:"3.11.9"
19+
-short:"3.12"
20+
full:"3.12.4"
21+
-short:"3.13"
22+
full:"3.13.0"
23+
fail-fast:false
24+
name:Test Python ${{ matrix.python_version.short }} (${{ matrix.python_version.full }})
825
steps:
9-
-uses:actions/checkout@v1
10-
-name:Install dependencies
11-
run:|
12-
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
15-
sudo apt remove --purge -yqq vim vim-runtime gvim
16-
-name:build and install vim from source
17-
working-directory:/tmp
18-
run:|
19-
export PYTHON_CONFIGURE_OPTS="--enable-shared"
20-
git clone https://github.com/vim/vim.git
21-
cd vim
22-
./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
23-
sudo make && sudo make install
24-
-name:Install python-mode
25-
run:|
26-
export PYMODE_DIR="${HOME}/work/python-mode/python-mode"
27-
mkdir -p ${HOME}/.vim/pack/foo/start/
28-
ln -s ${PYMODE_DIR} ${HOME}/.vim/pack/foo/start/python-mode
29-
cp ${PYMODE_DIR}/tests/utils/pymoderc ${HOME}/.pymoderc
30-
cp ${PYMODE_DIR}/tests/utils/vimrc ${HOME}/.vimrc
31-
touch ${HOME}/.vimrc.before ${HOME}/.vimrc.after
32-
-name:Run python-mode test script
33-
run:|
34-
alias python=python3
35-
cd ${HOME}/work/python-mode/python-mode
36-
git submodule update --init --recursive
37-
git submodule sync
38-
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
26+
-name:Checkout repository
27+
uses:actions/checkout@v4
28+
with:
29+
submodules:recursive
30+
31+
-name:Set up Docker Buildx
32+
uses:docker/setup-buildx-action@v3
33+
34+
-name:Build Docker image
35+
run:|
36+
docker compose build -q \
37+
--build-arg PYTHON_VERSION="${{ matrix.python_version.full }}" \
38+
--build-arg PYTHON_VERSION_SHORT="${{ matrix.python_version.short }}" \
39+
python-mode-tests
40+
41+
-name:Run tests with Python ${{ matrix.python_version.short }}
42+
run:|
43+
docker compose run --rm \
44+
-e PYTHON_VERSION="${{ matrix.python_version.full }}" \
45+
-e PYTHON_VERSION_SHORT="${{ matrix.python_version.short }}" \
46+
python-mode-tests

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp