Add CI runner (#5)
Reviewed-on: #5 Co-authored-by: Igor Ranieri <igor@elland.me> Co-committed-by: Igor Ranieri <igor@elland.me>
This commit is contained in:
parent
d8ba47a8b6
commit
08dc87a307
7 changed files with 228 additions and 53 deletions
41
Makefile
41
Makefile
|
|
@ -1,9 +1,44 @@
|
|||
.PHONY: help
|
||||
help: ## Show this help.
|
||||
help: ## Show this help
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
.PHONY: format
|
||||
format:
|
||||
.PHONY: build
|
||||
build: ## Build the project
|
||||
cabal build
|
||||
|
||||
.PHONY: test
|
||||
test: ## Run tests
|
||||
cabal test --test-show-details=direct
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Clean build artifacts
|
||||
cabal clean
|
||||
|
||||
.PHONY: fourmolu
|
||||
fourmolu: ## Format Haskell code
|
||||
find . -type f -name "*.hs" ! -path "./dist-newstyle/*" -exec fourmolu -i {} +
|
||||
|
||||
.PHONY: fourmolu-check
|
||||
fourmolu-check: ## Check if code is formatted
|
||||
find . -type f -name "*.hs" ! -path "./dist-newstyle/*" -exec fourmolu --mode check {} \;
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## Run hlint
|
||||
hlint src test app
|
||||
|
||||
.PHONY: cabal-gild
|
||||
cabal-gild: ## Format cabal file
|
||||
cabal-gild --io=haddock2.cabal
|
||||
|
||||
.PHONY: format
|
||||
format: fourmolu cabal-gild ## Run all formatters
|
||||
|
||||
.PHONY: check
|
||||
check: fourmolu-check lint ## Run all checks (CI-style)
|
||||
|
||||
.PHONY: ci
|
||||
ci: build test check ## Run full CI pipeline locally
|
||||
|
||||
.PHONY: docs
|
||||
docs: ## Generate documentation
|
||||
cabal haddock --haddock-hyperlink-source
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue