diff options
author | kylo252 <[email protected]> | 2021-10-09 22:17:30 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2021-10-09 22:17:30 +0200 |
commit | caf62bcfed4fc6cfed26164e39d22a568d21f9d0 (patch) | |
tree | 47f7ddcbe7ef10b6cffd8398dbfc215d94fc2fae /.github | |
parent | 4126e5765d69840660fab2a05bbc664ad0117b95 (diff) | |
parent | 82b7a35858479223c1e34bea2f64451ecf1e5f66 (diff) |
Merge remote-tracking branch 'origin/rolling'
Diffstat (limited to '.github')
-rw-r--r-- | .github/ISSUE_TEMPLATE/config.yml | 2 | ||||
-rw-r--r-- | .github/workflows/commitlint.config.js | 34 | ||||
-rw-r--r-- | .github/workflows/commitlint.yml | 15 | ||||
-rw-r--r-- | .github/workflows/format.yaml | 27 | ||||
-rw-r--r-- | .github/workflows/install.yaml | 21 | ||||
-rw-r--r-- | .github/workflows/lint.yaml | 24 |
6 files changed, 82 insertions, 41 deletions
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 12d6ceab..219f903b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,7 +2,7 @@ blank_issues_enabled: true contact_links: - name: Matrix community - url: https://matrix.to/#/+atmachine:matrix + url: https://matrix.to/#/#atmachine-neovim:matrix.org about: Please ask and answer questions on Matrix. - name: Discord community url: https://discord.gg/Xb9B4Ny 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/[email protected] + 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 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/[email protected] + 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..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" @@ -23,31 +23,26 @@ 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 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 - 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 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" |