-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (50 loc) · 1.48 KB
/
tests.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Test
on:
push:
workflow_dispatch:
jobs:
run_tests:
runs-on: [ubuntu-latest]
env:
KAFKA_IS_ON: "true"
services:
kafkatest:
image: petermeissner/kafkatest
ports:
- "2181:2181"
- "9092:9092"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- name: Check if zookeeper is up and running
run: |
until echo "srvr" | nc localhost 2181 | grep -e "Zookeeper version: " -c ; do echo "waiting"; sleep 1; done
echo "srvr" | nc localhost 2181
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -yq libcurl4-openssl-dev default-jre default-jdk
sudo R CMD javareconf
- name: Install R dependencies
shell: Rscript {0}
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
- name: Check Environment Vars
shell: Rscript {0}
run: |
stopifnot(Sys.getenv("KAFKA_IS_ON") == 'true')
- name: Check
shell: Rscript {0}
run: |
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
- name: Lint
shell: Rscript {0}
run: |
remotes::install_cran("lintr")
lintr::lint_package()
- name: Test coverage
shell: Rscript {0}
run: |
remotes::install_cran("covr")
covr::codecov()