-
Notifications
You must be signed in to change notification settings - Fork 120
107 lines (94 loc) · 2.99 KB
/
test.yml
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
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:
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
exclude:
- os: 'ubuntu-latest'
python-version: '3.7'
- os: 'macos-latest'
python-version: '3.7'
- os: 'macos-latest'
python-version: '3.8'
- os: 'macos-latest'
python-version: '3.9'
include:
- os: 'ubuntu-20.04'
python-version: '3.7'
- os: 'macos-12'
python-version: '3.7'
- os: 'macos-12'
python-version: '3.8'
- os: 'macos-12'
python-version: '3.9'
name: "test (python ${{ matrix.python-version }}, ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: ${{ matrix.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/nightly/${BASE}.tar.gz"
tar xvf "${BASE}.tar.gz"
echo "RUNNER_OS = $RUNNER_OS"
$BASE/bin/nvim --version
# update $PATH for later steps
echo "$(pwd)/$BASE/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- 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/bi/nvim --version
# update $PATH for later steps
echo "$(pwd)/nvim-win64/bin" >> $GITHUB_PATH
- 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