From 38f53bf08c974791f3d51e8a9c7efe9373c8ce3a Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:53:21 +0200 Subject: [Feature]: Add some very basic unit-tests (#1369) --- .github/workflows/format.yaml | 27 ++++++++++++--------------- .github/workflows/install.yaml | 5 +++++ .github/workflows/lint.yaml | 24 ++++++++++++------------ 3 files changed, 29 insertions(+), 27 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 142ba7f1..7f5f57d6 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -1,11 +1,11 @@ name: format on: push: - branches: '**' + branches: "**" pull_request: branches: - - 'master' - - 'rolling' + - "master" + - "rolling" jobs: stylua-check: @@ -14,14 +14,13 @@ jobs: 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: Lint with stylua + uses: JohnnyMorganz/stylua-action@1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # CLI arguments + args: --check . - - name: Check formatting - run: | - ./utils/stylua --config-path .stylua.toml -c . shfmt-check: name: "Formatting check with shfmt" runs-on: ubuntu-20.04 @@ -31,14 +30,12 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.16' - + go-version: "1.16" + - name: Use shfmt run: | GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt # https://google.github.io/styleguide/shellguide.html - name: Check formatting - run: | - shfmt -f . | grep -v jdtls | xargs shfmt -i 2 -ci -l -d - + run: make style-sh diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index fa8bf0e3..3e529dc6 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -43,6 +43,11 @@ jobs: ln -s "$PWD"/* "$HOME"/.local/share/lunarvim/lvim/. bash ./utils/installer/install.sh + - name: Run unit-tests + # NOTE: make sure to adjust the timeout if you start adding a lot of tests + timeout-minutes: 4 + run: make test + - name: Test LunarVim PackerCompile run: if "$HOME"/.local/bin/lvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d187f497..93050bba 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,11 +1,11 @@ name: lint on: push: - branches: '**' + branches: "**" pull_request: branches: - - 'master' - - 'rolling' + - "master" + - "rolling" jobs: lua-linter: @@ -13,23 +13,23 @@ jobs: 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/ + run: make lint-lua shellcheck: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master - with: - scandir: './utils' - ignore: 'bin' + - uses: actions/checkout@v2 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + with: + scandir: "./utils" + ignore: "bin" -- cgit v1.2.3 From fcb764cd638ddffbe96228c6b3b1b8e0d40dbb23 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 13 Sep 2021 11:10:07 +0200 Subject: refactor(ci): better path handling (#1531) --- .github/workflows/install.yaml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index 3e529dc6..6d84f79c 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -23,16 +23,9 @@ jobs: steps: - uses: actions/checkout@v2 - # sha256sum is not available by default - - name: Installl dependencies for OSX - if: matrix.os == 'osx' - run: | - echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $GITHUB_ENV - echo "$HOME/.local/bin" >> $GITHUB_PATH - brew install coreutils - - name: Install neovim binary run: | + echo "$HOME/.local/bin" >> $GITHUB_PATH bash ./utils/installer/install-neovim-from-release - name: Install LunarVim @@ -43,16 +36,16 @@ jobs: ln -s "$PWD"/* "$HOME"/.local/share/lunarvim/lvim/. bash ./utils/installer/install.sh - - name: Run unit-tests - # NOTE: make sure to adjust the timeout if you start adding a lot of tests - timeout-minutes: 4 - run: make test - - name: Test LunarVim PackerCompile run: if "$HOME"/.local/bin/lvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi - name: Test LunarVim Health run: if "$HOME"/.local/bin/lvim --headless +checkhealth -c ':qall' 2>&1|grep -q 'Error'; then false; fi + + - name: Run unit-tests + # NOTE: make sure to adjust the timeout if you start adding a lot of tests + timeout-minutes: 4 + run: make test # freebsd: # runs-on: macos-latest # if: github.event.pull_request.draft == false -- cgit v1.2.3 From 346925fcdcc122702270ca678b5dd1e68820aa00 Mon Sep 17 00:00:00 2001 From: chaesngmin Date: Wed, 29 Sep 2021 22:44:35 -0700 Subject: feat: add commitlint CI (#1459) Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- .github/workflows/commitlint.config.js | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/commitlint.yml | 15 +++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/commitlint.config.js create mode 100644 .github/workflows/commitlint.yml (limited to '.github/workflows') diff --git a/.github/workflows/commitlint.config.js b/.github/workflows/commitlint.config.js new file mode 100644 index 00000000..2bc8d493 --- /dev/null +++ b/.github/workflows/commitlint.config.js @@ -0,0 +1,34 @@ +module.exports = { + rules: { + "body-leading-blank": [1, "always"], + "body-max-line-length": [2, "always", 100], + "footer-leading-blank": [1, "always"], + "footer-max-line-length": [2, "always", 100], + "header-max-length": [2, "always", 72], + "scope-case": [2, "always", "lower-case"], + "subject-case": [ + 2, + "never", + ["upper-case", "pascal-case", "sentence-case", "start-case"], + ], + "subject-empty": [2, "never"], + "subject-full-stop": [2, "never", "."], + "type-case": [2, "always", "lower-case"], + "type-empty": [2, "never"], + "type-enum": [ + 2, + "always", + [ + "build", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "test", + ], + ], + }, +}; diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 00000000..93c776e3 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,15 @@ +name: "Commit Linter" +on: pull_request +jobs: + lint-commits: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2.3.1 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v4 + with: + configFile: .github/workflows/commitlint.config.js + helpURL: https://github.com/LunarVim/LunarVim/blob/rolling/CONTRIBUTING.md#commit-messages -- cgit v1.2.3 From e270bdbd6f9adfd9ae471512c63c3283798481f1 Mon Sep 17 00:00:00 2001 From: Subho Banerjee Date: Thu, 30 Sep 2021 11:53:14 -0500 Subject: [Bugfix]: Use local install in Github actions (#1628) Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- .github/workflows/install.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index 6d84f79c..fa1b9be8 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -1,7 +1,7 @@ name: install on: push: - branches: "**" + branches: ["**"] pull_request: branches: - "master" @@ -31,10 +31,7 @@ jobs: - name: Install LunarVim timeout-minutes: 4 run: | - mkdir -p "$HOME"/.local/share/lunarvim/lvim - mkdir -p "$HOME"/.config/lvim - ln -s "$PWD"/* "$HOME"/.local/share/lunarvim/lvim/. - bash ./utils/installer/install.sh + ./utils/installer/install.sh --local --no-install-dependencies - name: Test LunarVim PackerCompile run: if "$HOME"/.local/bin/lvim --headless +PackerCompile -c ':qall' 2>&1|grep -q 'Error'; then false; fi -- cgit v1.2.3