-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (39 loc) · 2.1 KB
/
Copy pathMakefile
File metadata and controls
51 lines (39 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.ONESHELL:
.DELETE_ON_ERROR:
.RECIPEPREFIX := >
.DEFAULT_GOAL := help
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
SOURCE := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
TMPDIR ?= /tmp
ACT_CACHE_PATH ?= $(TMPDIR)/image.nvim-act
ACT_CACHE_SERVER_PATH ?= $(TMPDIR)/image.nvim-actcache
NIX_CACHE_HOME ?= $(TMPDIR)/image.nvim-nix-cache
ACT ?= env XDG_CACHE_HOME="$(NIX_CACHE_HOME)" nix run path:$(SOURCE)\#act --
ACT_FLAGS := --action-cache-path "$(ACT_CACHE_PATH)" --cache-server-path "$(ACT_CACHE_SERVER_PATH)"
BLUE := $(shell tput -Txterm setaf 4 2>/dev/null || true)
RESET := $(shell tput -Txterm sgr0 2>/dev/null || true)
.PHONY: help format test test-verbose test-minimal test-tap test-ci test-ci-stable test-ci-nightly
help: ## show this help
> @awk 'BEGIN { FS = ":.*## "; print "Available targets:" } /^[a-zA-Z0-9_-]+:.*## / { printf " $(BLUE)%-18s$(RESET) %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
format: ## format Lua files
> stylua lua tests
test: ## run full test suite
> @./scripts/test-runner.sh
test-verbose: ## run full test suite with verbose output
> @./scripts/test-runner.sh --verbose
test-minimal: ## run test suite with minimal output
> @./scripts/test-runner.sh --minimal
test-tap: ## run test suite with TAP output
> @./scripts/test-runner.sh --tap
test-ci: ## run GitHub Actions tests with act
> @command -v nix >/dev/null 2>&1 || { echo "nix is required to run pinned act; override ACT to use another executable"; exit 1; }
> $(ACT) $(ACT_FLAGS) -W .github/workflows/ci.yml
test-ci-stable: ## run stable Neovim CI tests with act
> @command -v nix >/dev/null 2>&1 || { echo "nix is required to run pinned act; override ACT to use another executable"; exit 1; }
> $(ACT) $(ACT_FLAGS) -W .github/workflows/ci.yml -j tests --matrix neovim_version:stable
test-ci-nightly: ## run nightly Neovim CI tests with act
> @command -v nix >/dev/null 2>&1 || { echo "nix is required to run pinned act; override ACT to use another executable"; exit 1; }
> $(ACT) $(ACT_FLAGS) -W .github/workflows/ci.yml -j tests --matrix neovim_version:nightly