Skip to content

Commit 3104f84

Browse files
committed
fix(ci): adapt to renamed nvim releases
1 parent ad8f0a4 commit 3104f84

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Check loading of syntax files
22

33
on:
4-
push:
54
pull_request:
65
schedule:
76
- cron: '0 0 * * *' # every day at midnight
@@ -10,6 +9,9 @@ jobs:
109
luacheck:
1110
name: Check Query Files
1211
runs-on: ubuntu-latest
12+
env:
13+
NVIM_TAG: stable
14+
APPIMAGE: nvim-linux-x86_64.appimage
1315
steps:
1416
- uses: actions/checkout@v3
1517
- uses: actions/setup-node@v3
@@ -20,19 +22,20 @@ jobs:
2022
- name: Prepare
2123
env:
2224
NVIM_TAG: stable
25+
APPIMAGE: nvim-linux-x86_64.appimage
2326
run: |
2427
sudo apt-get update && sudo apt-get install libfuse2
2528
sudo add-apt-repository universe
26-
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim.appimage
27-
chmod u+x nvim.appimage
29+
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/${APPIMAGE}
30+
chmod u+x ${APPIMAGE}
2831
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
2932
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
3033
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
3134
cd ~/.local/share/nvim/site/pack/nvim-treesitter/start
3235
git clone https://github.com/nvim-treesitter/nvim-treesitter.git
3336
3437
- name: Compile parsers
35-
run: ./nvim.appimage --headless -c "TSInstallSync all" -c "q"
38+
run: ./${APPIMAGE} --headless -c "TSInstallSync all" -c "q"
3639

3740
- name: Check query files
38-
run: ./nvim.appimage --headless -c "luafile ./scripts/check-queries.lua" -c "q"
41+
run: ./${APPIMAGE} --headless -c "luafile ./scripts/check-queries.lua" -c "q"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Linting and style checking
22

3-
on: [push, pull_request]
3+
on: pull_request
44

55
jobs:
66
luacheck:

.github/workflows/tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Tests
22

33
on:
4-
push:
54
pull_request:
6-
types: [opened, synchronize, reopened, ready_for_review]
75
branches:
86
- 'master'
97

.github/workflows/update-readme.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
update-readme:
1010
name: Update README.md
1111
runs-on: ubuntu-latest
12+
env:
13+
APPIMAGE: nvim-linux-x86_64.appimage
1214
steps:
1315
- uses: actions/checkout@v3
1416
- uses: actions/setup-node@v3
@@ -20,23 +22,23 @@ jobs:
2022
run: |
2123
sudo apt-get update && sudo apt-get install libfuse2
2224
sudo add-apt-repository universe
23-
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
24-
chmod u+x nvim.appimage
25+
wget https://github.com/neovim/neovim/releases/download/nightly/${APPIMAGE}
26+
chmod u+x ${APPIMAGE}
2527
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
2628
ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter-textobject/start
2729
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
2830
cd ~/.local/share/nvim/site/pack/nvim-treesitter/start
2931
git clone https://github.com/nvim-treesitter/nvim-treesitter.git
3032
3133
- name: Compile parsers
32-
run: ./nvim.appimage --headless -c "TSInstallSync all" -c "q"
34+
run: ./${APPIMAGE} --headless -c "TSInstallSync all" -c "q"
3335

3436
# inspired by nvim-lspconfigs
3537
- name: Check README
3638
run: |
3739
git config user.email "actions@github"
3840
git config user.name "Github Actions"
39-
./nvim.appimage --headless -c "luafile ./scripts/update-readme.lua" -c "q" || echo "Needs update"
41+
./${APPIMAGE} --headless -c "luafile ./scripts/update-readme.lua" -c "q" || echo "Needs update"
4042
git add README.md
4143
git commit -m "docs: update queries in README" || echo 'No commit necessary!'
4244
git clean -xf
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
wget "https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux64.tar.gz"
2-
tar -zxf nvim-linux64.tar.gz
3-
sudo ln -s "$(pwd)/nvim-linux64/bin/nvim" /usr/local/bin
4-
rm -rf "$(pwd)/nvim-linux64/lib/nvim/parser"
1+
wget "https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux-x86_64.tar.gz"
2+
tar -zxf nvim-linux-x86_64.tar.gz
3+
sudo ln -s "$(pwd)/nvim-linux-x86_64/bin/nvim" /usr/local/bin
4+
rm -rf "$(pwd)/nvim-linux-x86_64/lib/nvim/parser"
55
mkdir -p ~/.local/share/nvim/site/pack/ci/opt
66
ln -s "$(pwd)" ~/.local/share/nvim/site/pack/ci/opt

0 commit comments

Comments
 (0)