35
35
include :
36
36
- os : ' ubuntu-20.04'
37
37
python-version : ' 3.7'
38
- NIGHTLY : nvim-linux64.tar.gz
39
- NVIM_BIN_PATH : nvim-linux64/bin
40
- EXTRACT : tar xzf
41
- - os : ' ubuntu-latest'
42
- NIGHTLY : nvim-linux64.tar.gz
43
- NVIM_BIN_PATH : nvim-linux64/bin
44
- EXTRACT : tar xzf
45
- - os : ' macos-latest'
46
- NIGHTLY : nvim-macos-x86_64.tar.gz
47
- NVIM_BIN_PATH : nvim-macos-x86_64/bin
48
- EXTRACT : tar xzf
49
- - os : ' windows-latest'
50
- NIGHTLY : nvim-win64.zip
51
- NVIM_BIN_PATH : nvim-win64/bin
52
- EXTRACT : unzip
53
38
54
39
name : " test (python ${{ matrix.python-version }}, ${{ matrix.os }})"
55
40
runs-on : ${{ matrix.os }}
@@ -60,20 +45,36 @@ jobs:
60
45
cache : ' pip'
61
46
python-version : ${{ matrix.python-version }}
62
47
63
- - name : update path (bash )
48
+ - name : install neovim (Linux/macOS )
64
49
if : runner.os != 'Windows'
65
- run : echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" >> $GITHUB_PATH
50
+ run : |
51
+ set -eu -o pipefail
66
52
67
- - name : update path (windows)
68
- if : runner.os == 'Windows'
69
- run : echo "$(pwd)/${{ matrix.NVIM_BIN_PATH }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
53
+ if [[ "$RUNNER_OS" == "Linux" ]]; then
54
+ BASE="nvim-linux64"
55
+ elif [[ "$RUNNER_OS" == "macOS" ]]; then
56
+ BASE="nvim-macos-x86_64"
57
+ else
58
+ echo "$RUNNER_OS not supported"; exit 1;
59
+ fi
60
+
61
+ curl -LO "https://github.com/neovim/neovim/releases/download/nightly/${BASE}.tar.gz"
62
+ tar xzf "${BASE}.tar.gz"
63
+ echo "RUNNER_OS = $RUNNER_OS"
64
+ $BASE/bin/nvim --version
70
65
71
- - name : install neovim
66
+ # update $PATH for later steps
67
+ echo "$(pwd)/$BASE/bin" >> $GITHUB_PATH
68
+
69
+ - name : install neovim (Windows)
70
+ if : runner.os == 'Windows'
72
71
run : |
73
- curl -LO 'https://github.com/neovim/neovim/releases/download/nightly/${{ matrix.NIGHTLY }}'
74
- ${{ matrix.EXTRACT }} ${{ matrix.NIGHTLY }}
75
- echo '${{ runner.os }}'
76
- nvim --version
72
+ curl -LO "https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip"
73
+ unzip nvim-win64.zip
74
+ nvim-win64/bin/nvim --version
75
+
76
+ # update $PATH for later steps
77
+ echo "$(pwd)/nvim-win64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
77
78
78
79
- name : install dependencies
79
80
run : |
0 commit comments