-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
44 lines (43 loc) · 1.73 KB
/
action.yml
File metadata and controls
44 lines (43 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 'Neovim :checkhealth Runner'
description: 'Make sure Neovim health checks succeed'
author: 'Colin Kennedy'
branding:
color: 'blue'
icon: 'moon'
inputs:
checks:
description: 'A list of checks to run. See `:help checkhealth` for the syntax.'
default: 'vim.*'
required: true
executable:
description: 'The relative or absolute path to a callable Neovim.'
default: 'nvim'
required: true
minimum_severity:
description: 'The minimum issue needed to produce an error. Example: "error" "info", "warn". Use "" to assign no minimum severity'
default: 'error'
required: false
runs:
using: 'composite'
steps:
- name: Run
uses: knicknic/os-specific-run@v1.0.4
env:
# IMPORTANT: This is needed to avoid an error in Neovim nightly
# `- ERROR command failed: infocmp -L infocmp: environment variable TERM not set`
# Reference: https://github.com/ColinKennedy/nvim-checkhealth-gh-action/issues/1
#
TERM: xterm-256color
# NOTE: This environment variable is for readability / convenience
GITHUB_NEOVIM_CHECKHEALTH_COMMAND_LINUX_UNIX: ${{ inputs.executable }} --headless -l $GITHUB_ACTION_PATH/main.lua "${{ inputs.checks }}" ${{ inputs.minimum_severity }}
GITHUB_NEOVIM_CHECKHEALTH_COMMAND_POWERSHELL: ${{ inputs.executable }} --headless -l $env:GITHUB_ACTION_PATH/main.lua "${{ inputs.checks }}" ${{ inputs.minimum_severity }}
with:
linux: |
${{ env.GITHUB_NEOVIM_CHECKHEALTH_COMMAND_LINUX_UNIX }}
exit $?
macos: |
${{ env.GITHUB_NEOVIM_CHECKHEALTH_COMMAND_LINUX_UNIX }}
exit $?
windows: |
${{ env.GITHUB_NEOVIM_CHECKHEALTH_COMMAND_POWERSHELL }}
echo $LASTEXITCODE