Skip to content

checking to see where codecov is being written #24

checking to see where codecov is being written

checking to see where codecov is being written #24

Workflow file for this run

name: CI
on:
push:
branches: [main, codecov-dev]
pull_request:
branches: [main]
jobs:
test:
name: Neovim ${{ matrix.neovim }}
runs-on: ubuntu-latest
strategy:
matrix:
neovim: ["stable", "v0.10.0", "nightly"]
steps:
- name: Checkout plugin
uses: actions/checkout@v4
- name: Install Neovim ${{ matrix.neovim }}
run: |
set -euo pipefail
VERSION=${{ matrix.neovim }}
# All historic 0.x tags use nvim-linux64.tar.gz, everything newer uses -x86_64
if [[ "$VERSION" =~ ^v0\.[0-9]+\. ]]; then
FILENAME=nvim-linux64.tar.gz
else
FILENAME=nvim-linux-x86_64.tar.gz
fi
URL="https://github.com/neovim/neovim/releases/download/${VERSION}/${FILENAME}"
echo "Downloading $URL"
curl -fL -o nvim.tar.gz "$URL" # -f = fail on 4xx/5xx, -L = follow redirects
mkdir nvim-extract
tar -xzf nvim.tar.gz -C nvim-extract
DIR="$(ls nvim-extract | head -n1)" # should be nvim-linux64 or nvim-linux-x86_64
sudo mv "nvim-extract/$DIR" /opt/nvim
echo "/opt/nvim/bin" >> "$GITHUB_PATH"
- name: Verify Neovim
run: nvim --version
- name: Install Plenary
run: |
mkdir -p ~/.local/share/nvim/site/pack/test/start
git clone https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/test/start/plenary.nvim
- name: Install LuaRocks + luacheck + coverage tools
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y lua5.1 liblua5.1-0-dev luarocks
luarocks --lua-version=5.1 --local install luacheck
luarocks --lua-version=5.1 --local install luacov
luarocks --lua-version=5.1 --local install luacov-reporter-lcov
echo "$HOME/.luarocks/bin" >> $GITHUB_PATH
- name: Run tests with coverage
run: |
eval "$(luarocks --lua-version=5.1 path --bin)"
nvim --headless -u tests/minimal_init.lua -c "luafile tests/run_cov.lua"
echo "::group::Coverage"
ls -l luacov.stats.out || { echo "stats file missing"; exit 1; }
find . -maxdepth 3 -name "luacov.stats.out"
luacov -t LcovReporter
echo "::endgroup::"
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
files: lcov.info # <-- new file
token: ${{ secrets.CODECOV_TOKEN }}