fix: remove useless ci script
This commit is contained in:
parent
a25f1e9d84
commit
f83fb8b4a7
2 changed files with 5 additions and 72 deletions
12
.github/workflows/test.yaml
vendored
12
.github/workflows/test.yaml
vendored
|
|
@ -21,10 +21,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
nvim_version: ${{ matrix.nvim }}
|
nvim_version: ${{ matrix.nvim }}
|
||||||
before: |
|
before: |
|
||||||
git clone --depth 1 https://github.com/the-mikedavis/tree-sitter-diff /tmp/tree-sitter-diff
|
git clone --depth 1 https://github.com/the-mikedavis/tree-sitter-diff /tmp/ts-diff
|
||||||
cd /tmp/tree-sitter-diff && cc -shared -fPIC -o diff.so -I./src src/parser.c
|
cd /tmp/ts-diff && cc -shared -fPIC -o diff.so -I./src src/parser.c
|
||||||
PARSER_DIR=$(nvim --headless -c 'lua print(vim.fn.stdpath("data") .. "/site/parser")' -c 'q' 2>&1 | tail -1)
|
mkdir -p ~/.local/share/nvim/site/parser ~/.local/share/nvim/site/queries/diff
|
||||||
echo "Installing parser to: $PARSER_DIR"
|
cp diff.so ~/.local/share/nvim/site/parser/
|
||||||
mkdir -p "$PARSER_DIR"
|
cp queries/*.scm ~/.local/share/nvim/site/queries/diff/
|
||||||
cp diff.so "$PARSER_DIR/"
|
|
||||||
nvim --headless -c 'lua print("diff parser available:", pcall(vim.treesitter.language.inspect, "diff"))' -c 'q'
|
|
||||||
|
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
RED='\033[0;31m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
YELLOW='\033[0;33m'
|
|
||||||
BOLD='\033[1m'
|
|
||||||
RESET='\033[0m'
|
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
||||||
cd "$ROOT_DIR"
|
|
||||||
|
|
||||||
tmpdir=$(mktemp -d)
|
|
||||||
trap 'rm -rf "$tmpdir"' EXIT
|
|
||||||
|
|
||||||
run_job() {
|
|
||||||
local name=$1
|
|
||||||
shift
|
|
||||||
local log="$tmpdir/$name.log"
|
|
||||||
if "$@" >"$log" 2>&1; then
|
|
||||||
echo -e "${GREEN}✓${RESET} $name"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo -e "${RED}✗${RESET} $name"
|
|
||||||
cat "$log"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
echo -e "${BOLD}Running CI jobs in parallel...${RESET}"
|
|
||||||
echo
|
|
||||||
|
|
||||||
pids=()
|
|
||||||
jobs_names=()
|
|
||||||
|
|
||||||
run_job "stylua" stylua --check . &
|
|
||||||
pids+=($!); jobs_names+=("stylua")
|
|
||||||
|
|
||||||
run_job "selene" selene --display-style quiet . &
|
|
||||||
pids+=($!); jobs_names+=("selene")
|
|
||||||
|
|
||||||
run_job "prettier" prettier --check . &
|
|
||||||
pids+=($!); jobs_names+=("prettier")
|
|
||||||
|
|
||||||
run_job "busted" env \
|
|
||||||
LUA_PATH="/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib/lua/5.1/?.lua;/usr/lib/lua/5.1/?/init.lua;;" \
|
|
||||||
LUA_CPATH="/usr/lib/lua/5.1/?.so;;" \
|
|
||||||
nvim -l /usr/lib/luarocks/rocks-5.1/busted/2.3.0-1/bin/busted --verbose spec/ &
|
|
||||||
pids+=($!); jobs_names+=("busted")
|
|
||||||
|
|
||||||
failed=0
|
|
||||||
for i in "${!pids[@]}"; do
|
|
||||||
if ! wait "${pids[$i]}"; then
|
|
||||||
failed=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo
|
|
||||||
if [ "$failed" -eq 0 ]; then
|
|
||||||
echo -e "${GREEN}${BOLD}All jobs passed.${RESET}"
|
|
||||||
else
|
|
||||||
echo -e "${RED}${BOLD}Some jobs failed.${RESET}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue