diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/format.yaml | 43 | ||||
-rw-r--r-- | .github/workflows/install.yaml | 72 | ||||
-rw-r--r-- | .github/workflows/lint.yaml | 38 |
3 files changed, 153 insertions, 0 deletions
diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 00000000..22e56d61 --- /dev/null +++ b/.github/workflows/format.yaml @@ -0,0 +1,43 @@ +name: format +on: + push: + branches: '**' + pull_request: + branches: + - 'master' + - 'rolling' + +jobs: + stylua-check: + name: "Formatting check with Stylua" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Prepare dependencies + run: | + sudo apt install -y curl unzip --no-install-recommends + bash ./utils/installer/install_stylua.sh + + - name: Check formatting + run: | + ./utils/stylua --config-path .stylua.toml -c . + shfmt-check: + name: "Formatting check with shfmt" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: '1.16' + + - name: Use shfmt + run: | + GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt + + - name: Check formatting + run: | + shfmt -l -d . + diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml new file mode 100644 index 00000000..e31607fe --- /dev/null +++ b/.github/workflows/install.yaml @@ -0,0 +1,72 @@ +name: install +on: + push: + branches: '**' + pull_request: + branches: + - 'master' + - 'rolling' + +jobs: + unixish: + name: ${{ matrix.os }} ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - runner: ubuntu-20.04 + os: linux + - runner: macos-10.15 + os: osx + runs-on: ${{ matrix.runner }} + if: github.event.pull_request.draft == false + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies for Linux + if: matrix.os == 'linux' + run: | + sudo add-apt-repository ppa:neovim-ppa/unstable -y + sudo apt-get update + sudo apt-get install neovim -y + + - name: Installl dependencies for OSX + if: matrix.os == 'osx' + run: | + brew update >/dev/null + brew install neovim + + - name: Install LunarVim + run: | + bash ./utils/installer/install.sh --testing + + - name: Test LunarVim PackerCompile + run: if lvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi + + - name: Test LunarVim Health + run: if lvim --headless +checkhealth -c ':qall' 2>&1|grep -q 'Error'; then false; fi + +# freebsd: +# runs-on: macos-latest +# if: github.event.pull_request.draft == false +# continue-on-error: true # we don't support freebsd yet +# name: "FreeBSD macos-latest" +# steps: +# - uses: actions/checkout@v2 + +# - name: Install dependencies for FreeBSD +# uses: vmactions/[email protected] +# with: +# prepare: pkg install -y curl neovim +# run: bash ./utils/installer/install.sh + +# - name: Test LunarVim PackerCompile +# uses: vmactions/[email protected] +# with: +# run: if nvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi + +# - name: Test LunarVim Health +# uses: vmactions/[email protected] +# with: +# run: if nvim --headless +checkhealth -c ':qall' 2>&1|grep -q 'Error'; then false; fi + diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..87f93a00 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,38 @@ +name: lint +on: + push: + branches: '**' + pull_request: + branches: + - 'master' + - 'rolling' + +jobs: + lua-linter: + name: "Linting with luacheck" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - uses: leafo/gh-actions-lua@v8 + - uses: leafo/gh-actions-luarocks@v4 + + - name: Use luacheck + run: luarocks install luacheck + + - name: Run luacheck + run: luacheck *.lua lua/ + + shell-linter: + name: "Linting with shellcheck" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Use shellcheck + run: sudo apt-get install shellcheck + + - name: Run shellcheck + run: | + pwd + shellcheck $(find . -name "*.sh") |