Skip to content

Add linting checks to CI & local setup #27

Add linting checks to CI & local setup

Add linting checks to CI & local setup #27

Workflow file for this run

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 "@edgecommunity http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apk add --no-cache stylua luacheck prettier@testing pre-commit@edgecommunity
- name: Run pre-commit on all files
run: pre-commit run --all-files