Skip to content

Commit

Permalink
feat: before input
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Sep 10, 2024
1 parent 60e4dd8 commit 908051e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ busted --lua nlua spec/mytest_spec.lua

## Inputs

### `nvim_version`
### `nvim_version` (optional)

Version of Neovim to install. Valid values are `stable`, `nightly` or version tag such
as `v0.9.2`.
Expand All @@ -92,7 +92,7 @@ as `v0.9.2`.
> This value must exactly match to a tag name
> when installing the specific version.

### `luarocks_version`
### `luarocks_version` (optional)

Version of LuaRocks[^2] to install.

Expand All @@ -101,6 +101,12 @@ Version of LuaRocks[^2] to install.
[^2]: This action uses [LuaRocks](https://luarocks.org/)
to install `busted` and test dependencies.

### `before` (optional)

A bash script to run before running the tests.
For example, you can use this to install additional luarocks packages
that can't be installed automatically using `luarocks test`.

## Resources

- [`nvim-lua/nvim-lua-plugin-template`](https://github.com/nvim-lua/nvim-lua-plugin-template/)
Expand Down
11 changes: 10 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ inputs:
required: false
default: 'stable'
luarocks_version:
description: 'Version of LuaRocks to install.'
description: Version of LuaRocks to install.
required: false
default: '3.11.1'
before:
description: Script to run before running tests.
required: false
default: ''
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -57,6 +61,11 @@ runs:
with:
luarocksVersion: ${{ inputs.luarocks_version }}

- name: Run 'before' script
if: ${{ inputs.before != '' }}
run: ${{ inputs.before }}
shell: bash

- name: Install busted and nlua
if: steps.cache-luarocks.outputs.cache-hit != 'true'
run: |
Expand Down

0 comments on commit 908051e

Please sign in to comment.