Add linting checks to CI & local setup #31
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: alpine:latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Install dependencies and Neovim | |
run: | | |
apk update | |
apk add neovim git curl | |
- name: Install Plenary | |
run: | | |
mkdir -p ~/.config/nvim/pack/plenary/start | |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim.git ~/.config/nvim/pack/plenary/start/plenary.nvim | |
- name: Run tests | |
run: | | |
nvim --headless -c 'PlenaryBustedDirectory tests/plenary/ { init = "./tests/init.test.lua" }' | |
lint: | |
runs-on: ubuntu-latest | |
container: alpine:latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Install system dependencies | |
run: | | |
echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | |
apk update | |
apk add --no-cache git stylua luacheck prettier@testing | |
- name: Run Luacheck | |
run: luacheck . | |
- name: Run Stylua | |
run: stylua --check . | |
- name: Run Prettier | |
run: prettier --check . |