CI: fix tests
Change-Id: I48db4254cc47bc781967c76d2527fbfb48d95848
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4ff86d1..12e8b04 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,7 +3,7 @@
build-rkorapclient-on-stable:
extends: .install-rkorapclient
- image: ubuntu:latest
+ image: rocker/tidyverse
cache:
key: rkorapclient-ubuntu-stable
paths:
@@ -12,6 +12,8 @@
- rlib/
script:
- start_section testing "Testing RKorAPClient"
- - R -q -e 'library(RKorAPClient); testthat::test_dir("tests/testthat")'
+ - echo -e "apt-cache\nccache\nrlib" >> .Rbuildignore
+ - R -q -e "devtools::check(args = c('--no-examples'))"
+ - R -q -e 'devtools::test()'
- end_section testing
diff --git a/ci/install-rkorapclient-ci.yml b/ci/install-rkorapclient-ci.yml
index 6e46c8b..f66c926 100644
--- a/ci/install-rkorapclient-ci.yml
+++ b/ci/install-rkorapclient-ci.yml
@@ -42,15 +42,12 @@
- ln -s $(which ccache) /usr/local/sbin/gcc
- ln -s $(which ccache) /usr/local/sbin/g++
- end_section install_linux_packages
-
- script:
- start_section installing "Installing RKorAPClient from source"
- export PATH=/usr/local/sbin:$PATH
- R -q -e "install.packages('pak', dependencies=TRUE)"
- - R -q -e "pak::pak('ggplot2', 'RKorAPClient', dependencies=TRUE)"
+ - R -q -e "pak::pak(c('devtools', 'RKorAPClient'), dependencies=TRUE)"
- end_section installing
- start_section linstalling "Installing RKorAPClient from source"
- R -q -e 'pak::pak(".")'
- ccache -s
- end_section linstalling
-
diff --git a/tests/testthat/test-collocations.R b/tests/testthat/test-collocations.R
index 60052a6..b0c7a7a 100644
--- a/tests/testthat/test-collocations.R
+++ b/tests/testthat/test-collocations.R
@@ -48,7 +48,7 @@
test_that("mergeDuplicateCollocatesWorksAsExpected", {
- ldf <- tibble(
+ ldf <- tibble::tibble(
node = c("focus(in [tt/p=NN] {[tt/l=nehmen]})"),
collocate = c("Anspruch"),
label = c(""),
@@ -71,7 +71,7 @@
logDice = c(11.6899933757298),
ll = c(3717716.74208791)
)
- rdf <- tibble(
+ rdf <- tibble::tibble(
node = c("focus({[tt/l=nehmen] in} [tt/p=NN])"),
collocate = c("Anspruch"),
label = c(""),
diff --git a/tests/testthat/test-misc.R b/tests/testthat/test-misc.R
index c87dea4..a5b73de 100644
--- a/tests/testthat/test-misc.R
+++ b/tests/testthat/test-misc.R
@@ -219,7 +219,7 @@
class = "data.frame",
row.names = c(NA,-14L)
)
- gpt <- df %>% ggplot(aes(year, ipm, fill = condition, color = condition)) +
+ gpt <- df %>% ggplot2::ggplot(ggplot2::aes(year, ipm, fill = condition, color = condition)) +
geom_freq_by_year_ci()
labels <- if ("get_labs" %in% getNamespaceExports("ggplot2")) {
ggplot2::get_labs(gpt)