Skip to content

Commit a3020c2

Browse files
wninegrcarriga
authored andcommitted
ci: update the testing nvim download steps
* Update the nvim version to v0.10.3. * Update the cache key generation algorithm.
1 parent 14ea717 commit a3020c2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/workflow.yaml

100644100755
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,24 @@ jobs:
2121
matrix:
2222
include:
2323
- os: ubuntu-20.04
24-
url: https://github.com/neovim/neovim/releases/download/v0.5.1/nvim-linux64.tar.gz
24+
nvim-version: '0.10.3'
2525
steps:
2626
- uses: actions/checkout@v2
27-
- run: date +%F > todays-date
27+
- id: nvim-sha
28+
run: |
29+
curl -sL https://github.com/neovim/neovim/releases/download/v${{ matrix.nvim-version }}/nvim-linux64.tar.gz.sha256sum > nvim-sha
30+
echo "cache-key=$(awk '{print $2 "-" $1}' nvim-sha)" >> "$GITHUB_OUTPUT"
2831
- name: Restore cache for today's nightly.
2932
uses: actions/cache@v2
3033
with:
3134
path: _neovim
32-
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
35+
key: ${{ steps.nvim-sha.outputs.cache-key }}
3336

3437
- name: Prepare dependencies
3538
run: |
3639
test -d _neovim || {
3740
mkdir -p _neovim
38-
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
41+
curl -sL https://github.com/neovim/neovim/releases/download/v${{ matrix.nvim-version }}/nvim-linux64.tar.gz | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
3942
}
4043
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
4144
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim

0 commit comments

Comments
 (0)