blob: 860ce7853b24422a8ab7ed47fb5c5937d3c24929 [file] [log] [blame]
Marc Kupietz16e66c32024-01-28 13:31:25 +01001include:
Marc Kupietz8a3402d2024-01-28 14:14:37 +01002 - local: ci/install-rkorapclient-ci.yml
Marc Kupietz810bc192024-01-25 15:07:51 +01003
4build-rkorapclient-on-stable:
Marc Kupietz16e66c32024-01-28 13:31:25 +01005 extends: .install-rkorapclient
Marc Kupietz5057f502025-04-06 16:55:57 +02006 image: rocker/tidyverse
Marc Kupietz810bc192024-01-25 15:07:51 +01007 cache:
8 key: rkorapclient-ubuntu-stable
9 paths:
10 - apt-cache/
11 - ccache/
12 - rlib/
Marc Kupietz03f22252025-04-06 16:14:50 +020013 script:
Marc Kupietze4065142026-09-05 15:47:17 +020014 # The Readme documentation prompting tests query LLMs and are therefore
15 # neither deterministic nor free. They run in their own job below, so that
16 # neither a model's mood nor an empty API account can turn this one red.
17 # Exported here rather than declared under variables:, since a project or
18 # instance variable of that name would take precedence over the latter.
19 - export RKORAP_LLM_MODELS=""
Marc Kupietz03f22252025-04-06 16:14:50 +020020 - start_section testing "Testing RKorAPClient"
Marc Kupietz5057f502025-04-06 16:55:57 +020021 - echo -e "apt-cache\nccache\nrlib" >> .Rbuildignore
22 - R -q -e "devtools::check(args = c('--no-examples'))"
23 - R -q -e 'devtools::test()'
Marc Kupietz03f22252025-04-06 16:14:50 +020024 - end_section testing
Marc Kupietz810bc192024-01-25 15:07:51 +010025
Marc Kupietz6957ac92026-09-03 12:18:27 +020026# Prompts LLMs with the Readme, to check that it still enables them to use the
27# package. A failure here is a hint that the documentation has become unclear
28# (or that a model had a bad day), not a broken build, hence allow_failure.
29readme-doc-prompting-tests:
30 extends: .install-rkorapclient
31 image: rocker/tidyverse
32 allow_failure: true
Marc Kupietz6957ac92026-09-03 12:18:27 +020033 cache:
34 key: rkorapclient-ubuntu-stable
35 paths:
36 - apt-cache/
37 - ccache/
38 - rlib/
39 script:
Marc Kupietze4065142026-09-05 15:47:17 +020040 # GLM-5.3-Flash solves all documentation tasks reliably, while the other
41 # low cost models are not there yet. Add them back here, comma separated,
42 # once they are: "gemini-3.5-flash-lite", "claude-sonnet-5", "gpt-5-nano".
43 # Exported here rather than declared under variables:, since a project or
44 # instance variable of that name would take precedence over the latter.
Marc Kupietz1cbb1552026-09-05 15:30:52 +020045 # Needs OPENROUTER_API_KEY as a masked project variable.
46 - export RKORAP_LLM_MODELS="z-ai/glm-5.3-flash"
Marc Kupietz6957ac92026-09-03 12:18:27 +020047 - start_section docprompting "Prompting LLMs with the Readme"
48 - echo -e "apt-cache\nccache\nrlib" >> .Rbuildignore
49 - R -q -e 'devtools::test(filter = "readme-against-llm")'
50 - end_section docprompting
51