Skip to content

Commit 379e84b

Browse files
committed
👷 Optimize CI workflow with modern GitHub Actions
Replace manual tool installation with GitHub Actions marketplace actions - Replace manual selene installation script with taiki-e/install-action - Replace manual stylua installation script with taiki-e/install-action - Add Node.js setup action for markdownlint dependency management - Remove manual Lua installation step (not needed for tests) - Simplify markdownlint installation to use npm directly - Remove complex shell scripting and error handling from tool setup Reduces CI execution time and improves reliability by using maintained GitHub Actions instead of custom installation scripts.
1 parent 7a0bf7f commit 379e84b

File tree

1 file changed

+17
-32
lines changed

1 file changed

+17
-32
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,23 @@ jobs:
1515
- name: → Checkout repository
1616
uses: actions/checkout@v4
1717

18-
- name: → Install linting tools
19-
run: |
20-
set -e
21-
# Install selene (Lua linter)
22-
echo "» Installing selene..."
23-
SELENE_VERSION=$(curl -s https://api.github.com/repos/Kampfkarren/selene/releases/latest | grep '"tag_name"' | cut -d '"' -f 4)
24-
wget -qO selene.zip https://github.com/Kampfkarren/selene/releases/download/${SELENE_VERSION}/selene-${SELENE_VERSION}-linux.zip
25-
unzip -q selene.zip
26-
chmod +x ./selene
27-
sudo mv ./selene /usr/local/bin/
28-
echo "√ selene $(selene --version) installed"
29-
30-
# Install stylua (Lua formatter)
31-
echo "» Installing stylua..."
32-
wget -qO stylua.zip https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux-x86_64.zip
33-
unzip -q stylua.zip
34-
chmod +x ./stylua
35-
sudo mv ./stylua /usr/local/bin/
36-
echo "√ stylua $(stylua --version) installed"
37-
38-
# Install markdownlint
39-
echo "» Installing markdownlint..."
40-
sudo apt-get update -qq
41-
sudo apt-get install -y nodejs npm
42-
npm install -g markdownlint-cli --silent
43-
echo "√ markdownlint installed"
18+
- name: → Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "22"
22+
23+
- name: → Install selene
24+
uses: taiki-e/install-action@v2
25+
with:
26+
tool: selene
27+
28+
- name: → Install stylua
29+
uses: taiki-e/install-action@v2
30+
with:
31+
tool: stylua
32+
33+
- name: → Install markdownlint
34+
run: npm install -g markdownlint-cli
4435

4536
- name: → Run make lint
4637
run: |
@@ -66,12 +57,6 @@ jobs:
6657
neovim: true
6758
version: ${{ matrix.neovim_version }}
6859

69-
- name: → Install Lua
70-
run: |
71-
sudo apt-get update -qq
72-
sudo apt-get install -y lua5.4
73-
echo "√ Lua $(lua -v) installed"
74-
7560
- name: → Show Neovim version
7661
run: nvim --version
7762

0 commit comments

Comments
 (0)