Skip to content

Commit 9232f86

Browse files
authored
ci: add code coverage back (#254)
1 parent 3ed7409 commit 9232f86

File tree

1 file changed

+39
-42
lines changed

1 file changed

+39
-42
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ jobs:
6161
- lint
6262
strategy:
6363
matrix:
64-
nvim_version: [stable, nightly, v0.9.0]
64+
nvim_version: [stable, nightly]
6565
runs-on: ubuntu-latest
6666
steps:
6767
- uses: actions/checkout@v4
6868
- uses: rhysd/action-setup-vim@v1
69-
id: vim
7069
with:
7170
neovim: true
7271
version: ${{ matrix.nvim_version }}
@@ -80,51 +79,49 @@ jobs:
8079
run: |
8180
luarocks install vusted
8281
vusted ./spec
83-
# code_coverage:
84-
# name: Code Coverage
85-
# needs:
86-
# - lint
87-
# strategy:
88-
# matrix:
89-
# nvim_version: [stable]
90-
# runs-on: ubuntu-latest
91-
# steps:
92-
# - uses: actions/checkout@v4
93-
# - uses: rhysd/action-setup-vim@v1
94-
# id: vim
95-
# with:
96-
# neovim: true
97-
# version: ${{ matrix.nvim_version }}
98-
# - uses: leafo/gh-actions-lua@v10
99-
# with:
100-
# # luaVersion: "luajit-2.1.0-beta3"
101-
# luaVersion: "luajit-openresty"
102-
# - uses: leafo/gh-actions-luarocks@v4
103-
# - name: Generate Coverage Reports
104-
# run: |
105-
# luarocks --lua-version=5.1 install luacov
106-
# luarocks --lua-version=5.1 install luacov-reporter-lcov
107-
# luarocks --lua-version=5.1 install vusted
108-
# vusted --coverage ./spec
109-
# echo "ls ."
110-
# ls -l .
111-
# echo "run luacov"
112-
# luacov
113-
# echo "ls ."
114-
# ls -l .
115-
# echo "tail ./luacov.report.out"
116-
# tail -n 10 ./luacov.report.out
117-
# - uses: codecov/codecov-action@v4
118-
# with:
119-
# files: luacov.report.out
120-
# env:
121-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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@v4
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-openresty"
99+
- uses: leafo/gh-actions-luarocks@v4
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 }}
122119
release:
123120
name: Release
124121
if: ${{ github.ref == 'refs/heads/master' }}
125122
needs:
126123
- unit_test
127-
# - code_coverage
124+
- code_coverage
128125
runs-on: ubuntu-latest
129126
steps:
130127
- uses: google-github-actions/release-please-action@v3

0 commit comments

Comments
 (0)