-
Notifications
You must be signed in to change notification settings - Fork 131
177 lines (152 loc) · 5.38 KB
/
test.yml
File metadata and controls
177 lines (152 loc) · 5.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
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: [
# NOTE: don't forget updating tox.ini
{ python-version: '3.14', neovim-version: 'nightly' },
{ 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' },
]
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
NVIM_OS="$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]')"
if ! [ "$NVIM_OS" = "linux" ] && ! [ "$NVIM_OS" = "macos" ]; then
echo "RUNNER_OS=${RUNNER_OS} not supported"; exit 1;
fi
NVIM_NAME="nvim-${NVIM_OS}-x86_64"
curl -LO "https://github.com/neovim/neovim/releases/download/${{ matrix.config.neovim-version || 'nightly' }}/${NVIM_NAME}.tar.gz"
tar xzf "${NVIM_NAME}.tar.gz"
echo "RUNNER_OS = $RUNNER_OS"
"$NVIM_NAME/bin/nvim" --version
# update $PATH for later steps
echo "$(pwd)/$NVIM_NAME/bin" >> "$GITHUB_PATH"
- name: install neovim (Windows)
if: runner.os == 'Windows'
run: |
curl -LO "https://github.com/neovim/neovim/releases/download/${{ matrix.config.neovim-version || '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
test-upstream:
strategy:
fail-fast: false
matrix:
config:
- python-version: '3.12'
os: ['ubuntu', 'macos', 'windows']
name:
test-upstream (python ${{ matrix.config.python-version }},
${{ 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 pynvim
run: |
./scripts/disable_log_statements.sh # Make pynvim in release-ready state
python3 -m pip install -e .
- name: clone nvim
run: |
git clone --depth=1 https://github.com/neovim/neovim.git neovim-repo
- name: setup MSVC (Windows)
if: runner.os == 'Windows'
run: neovim-repo/.github/scripts/env.ps1
- name: build nvim (Windows)
if: runner.os == 'Windows'
working-directory: neovim-repo
run: |
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build .deps
cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build build
- name: build nvim (Linux/macOS)
if: runner.os != 'Windows'
working-directory: neovim-repo
run: make
- name: install msys2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
update: true
install: unzip
pacboy: >-
make:p diffutils:p
release: false
- name: test-upstream oldtest (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
working-directory: neovim-repo/test/old/testdir
run: |
mingw32-make VERBOSE=1 SCRIPTS= test_python3
- name: test-upstream functionaltest (Windows)
if: runner.os == 'Windows'
working-directory: neovim-repo
env:
TEST_FILE: ./test/functional/provider/python3_spec.lua
run: |
cmake --build build --target functionaltest
- name: test-upstream (Linux/macOS)
if: runner.os != 'Windows'
working-directory: neovim-repo
run: |
make oldtest TEST_FILE=test_python3.vim
make functionaltest TEST_FILE=./test/functional/provider/python3_spec.lua