Skip to content

Commit 2826b75

Browse files
authored
ci(test): migrate 'vusted' tests to 'plenary.busted', and drop code coverage report (#272)
1 parent ff63746 commit 2826b75

File tree

11 files changed

+24
-56
lines changed

11 files changed

+24
-56
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -69,59 +69,13 @@ jobs:
6969
with:
7070
neovim: true
7171
version: ${{ matrix.nvim_version }}
72-
- uses: leafo/gh-actions-lua@v11
73-
with:
74-
luaVersion: "luajit-2.1"
75-
# luaVersion: "luajit-openresty"
76-
- uses: leafo/gh-actions-luarocks@v5
7772
- name: Run Test Cases
78-
shell: bash
79-
run: |
80-
luarocks --lua-version=5.1 install vusted
81-
vusted ./spec
82-
code_coverage:
83-
name: Code Coverage
84-
needs:
85-
- lint
86-
strategy:
87-
matrix:
88-
nvim_version: [stable]
89-
runs-on: ubuntu-latest
90-
steps:
91-
- uses: actions/checkout@v5
92-
- uses: rhysd/action-setup-vim@v1
93-
with:
94-
neovim: true
95-
version: ${{ matrix.nvim_version }}
96-
- uses: leafo/gh-actions-lua@v10
97-
with:
98-
luaVersion: "luajit-2.1"
99-
- uses: leafo/gh-actions-luarocks@v5
100-
- name: Generate Coverage Reports
101-
run: |
102-
luarocks install luacov
103-
luarocks install luacov-reporter-lcov
104-
luarocks --lua-version=5.1 install vusted
105-
vusted --coverage ./spec
106-
echo "ls -l ."
107-
ls -l .
108-
echo "luacov -r lcov"
109-
luacov -r lcov
110-
echo "ls -l ."
111-
ls -l .
112-
echo "tail ./luacov.report.out"
113-
tail -n 10 ./luacov.report.out
114-
- uses: codecov/codecov-action@v4
115-
with:
116-
files: luacov.report.out
117-
env:
118-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
73+
run: make test
11974
release:
12075
name: Release
12176
if: ${{ github.ref == 'refs/heads/master' }}
12277
needs:
12378
- unit_test
124-
- code_coverage
12579
runs-on: ubuntu-latest
12680
steps:
12781
- uses: google-github-actions/release-please-action@v3

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
TESTS_INIT=spec_init.lua
2+
TESTS_DIR=spec/
3+
4+
.PHONY: test
5+
6+
test:
7+
@nvim \
8+
--headless \
9+
--noplugin \
10+
-u ${TESTS_INIT} \
11+
-c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TESTS_INIT}' }"

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<a href="https://github.com/linrongbin16/commons.nvim"><img alt="commons.nvim" src="https://img.shields.io/badge/power_by-commons.nvim-pink" /></a>
66
<a href="https://luarocks.org/modules/linrongbin16/gitlinker.nvim"><img alt="luarocks" src="https://img.shields.io/luarocks/v/linrongbin16/gitlinker.nvim" /></a>
77
<a href="https://github.com/linrongbin16/gitlinker.nvim/actions/workflows/ci.yml"><img alt="ci.yml" src="https://img.shields.io/github/actions/workflow/status/linrongbin16/gitlinker.nvim/ci.yml?label=ci" /></a>
8-
<a href="https://app.codecov.io/github/linrongbin16/gitlinker.nvim"><img alt="codecov" src="https://img.shields.io/codecov/c/github/linrongbin16/gitlinker.nvim/main?label=codecov" /></a>
98
</p>
109

1110
> Maintained fork of [ruifm's gitlinker](https://github.com/ruifm/gitlinker.nvim), refactored with bug fixes, ssh host alias, blame support and other improvements.
@@ -199,9 +198,7 @@ require("gitlinker").link(opts)
199198
**Parameters:**
200199

201200
- `opts`: (Optional) lua table that contains below fields:
202-
203201
- `router_type`: Which router type should use. By default is `browse` when not specified. It has below options:
204-
205202
- `browse`
206203
- `blame`
207204
- `default_branch`
@@ -214,7 +211,6 @@ require("gitlinker").link(opts)
214211
> Once set this field, you will get full control of generating the url, and `router_type` field will no longer take effect.
215212
216213
- `action`: What action should do. By default it will copy the generated link to clipboard. It has below options, please see [`gitlinker.Action`](#gitlinkeraction) for more details.
217-
218214
- `require("gitlinker.actions").clipboard`: Copy url to clipboard.
219215
- `require("gitlinker.actions").system`: Open url in browser.
220216

@@ -646,11 +642,7 @@ To develop the project and make PR, please setup with:
646642
- [stylua](https://github.com/JohnnyMorganz/StyLua).
647643
- [selene](https://github.com/Kampfkarren/selene).
648644

649-
To run unit tests, please install below dependencies:
650-
651-
- [vusted](https://github.com/notomo/vusted).
652-
653-
Then test with `vusted ./spec`.
645+
To run unit tests, please use `make test`.
654646

655647
## Contribute
656648

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)