ci: stylua check #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'doc/**' | |
- 'README.md' | |
- 'DEVELOP.md' | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install stylua | |
shell: bash | |
run: | | |
# To update the version of stylua refer to the releases page for the URL: | |
# https://github.com/JohnnyMorganz/StyLua/releases | |
curl -LO https://github.com/JohnnyMorganz/StyLua/releases/download/v2.0.1/stylua-linux-x86_64.zip | |
unzip stylua-linux-x86_64.zip | |
rm -rf /opt/stylua | |
mkdir -p /opt/stylua | |
mv stylua /opt/stylua | |
# Add the stylua binary to the system's path. | |
echo /opt/stylua >> ${GITHUB_PATH} | |
- name: Run stylua check | |
run: make testfmt | |
- name: Install Neovim | |
shell: bash | |
run: | | |
# Install Neovim as per instructions in: | |
# https://github.com/neovim/neovim/blob/master/INSTALL.md#pre-built-archives-2 | |
curl -LO https://github.com/neovim/neovim/releases/download/v0.10.1/nvim-linux64.tar.gz | |
rm -rf /opt/nvim | |
mkdir -p /opt | |
tar -C /opt -xzf nvim-linux64.tar.gz | |
# Add the nvim binary to the system's path. | |
echo /opt/nvim-linux64/bin >> ${GITHUB_PATH} | |
- name: Run tests | |
shell: bash | |
run: | | |
nvim --version | |
make test | |
# --- | |
# Full list of packages installed on ubuntu-latest: | |
# https://gist.github.com/stevecondylios/fc6fd259af75a2545bfece930e24f57f |