-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (44 loc) · 1.07 KB
/
Makefile
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
52
53
54
55
56
57
58
all: lint test cover build docs
# Setup the local development environment
setup:
Rscript -e "install.packages('devtools'); devtools::install_dev_deps()"
# Do linting
lint:
Rscript -e 'lintr::lint_package()'
# Run all tests
test: test-cpp test-r
# Run C++ tests
test-cpp:
make -C tests/cpp
# Run R tests
test-r:
Rscript -e 'devtools::test()'
# Run tests automatically on file changes
autotest:
Rscript -e 'testthat::auto_test_package()'
# Run tests with coverage
cover:
Rscript -e 'covr::report(file="coverage/index.html")'
# Run benchmarks
bench:
make -C tests/bench
# Check the package
check:
Rscript -e 'devtools::check()'
# Build package
build:
Rscript -e 'devtools::document(); warnings()'
Rscript -e 'devtools::build()'
# Generate documentation
docs:
Rscript -e 'devtools::document(); pkgdown::build_site()'
.PHONY: docs
# Install package
install: build
Rscript -e 'devtools::install()'
# Register Rasta as a Stencila executor
register: install
Rscript -e 'rasta::register()'
# Clean up local development environment
clean:
rm -rf rasta_*.tar.gz rasta.Rcheck