Skip to content

Commit 3edf039

Browse files
authored
ci: fail on note and use mirai (#183)
* ci: fail on note and use mirai * ... * ... * ... * ...
1 parent 29152e9 commit 3edf039

19 files changed

+108
-44
lines changed

.github/workflows/dev-cmd-check.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
# dev cmd check workflow of the mlr3 ecosystem v0.2.0
1+
# dev cmd check workflow of the mlr3 ecosystem v0.4.0
22
# https://github.com/mlr-org/actions
3+
# modified to use supercharge/redis-github-action@1.7.0
34
on:
45
workflow_dispatch:
6+
inputs:
7+
debug_enabled:
8+
type: boolean
9+
description: 'Run the build with tmate debugging enabled'
10+
required: false
11+
default: false
512
push:
613
branches:
714
- main
@@ -26,8 +33,9 @@ jobs:
2633
config:
2734
- {os: ubuntu-latest, r: 'release', dev-package: 'mlr-org/bbotk'}
2835
- {os: ubuntu-latest, r: 'release', dev-package: 'mlr-org/mlr3'}
36+
- {os: ubuntu-latest, r: 'release', dev-package: 'mlr-org/mlr3misc'}
2937
- {os: ubuntu-latest, r: 'release', dev-package: 'mlr-org/mlr3tuning'}
30-
- {os: ubuntu-latest, r: 'release', dev-package: "mlr-org/mlr3tuning', 'mlr-org/mlr3learners', 'mlr-org/mlr3pipelines', 'mlr-org/bbotk', 'mlr-org/paradox"}
38+
- {os: ubuntu-latest, r: 'release', dev-package: 'mlr-org/paradox'}
3139

3240
steps:
3341
- uses: actions/checkout@v3
@@ -46,12 +54,17 @@ jobs:
4654
with:
4755
extra-packages: any::rcmdcheck
4856
needs: check
57+
error-on: '"note"'
4958

5059
- name: Install dev versions
51-
run: pak::pkg_install(c('${{ matrix.config.dev-package }}'))
60+
run: pak::pkg_install('${{ matrix.config.dev-package }}')
5261
shell: Rscript {0}
5362

54-
- uses: r-lib/actions/check-r-package@v2
63+
- uses: mxschmitt/action-tmate@v3
64+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
5565
with:
56-
args: 'c("--no-manual")' # "--as-cran" prevents to start external processes
66+
limit-access-to-actor: true
5767

68+
- uses: r-lib/actions/check-r-package@v2
69+
with:
70+
args: 'c("--no-manual", "--as-cran")'

.github/workflows/no-suggest-cmd-check.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
# r cmd check workflow of the mlr3 ecosystem v0.2.0
1+
# r cmd check workflow without suggests of the mlr3 ecosystem v0.1.0
22
# https://github.com/mlr-org/actions
3+
# modified to use supercharge/redis-github-action@1.7.0
34
on:
45
workflow_dispatch:
6+
inputs:
7+
debug_enabled:
8+
type: boolean
9+
description: 'Run the build with tmate debugging enabled'
10+
required: false
11+
default: false
512
push:
613
branches:
714
- main
@@ -12,7 +19,7 @@ on:
1219
name: no-suggest-cmd-check
1320

1421
jobs:
15-
r-cmd-check:
22+
no-suggest-cmd-check:
1623
runs-on: ${{ matrix.config.os }}
1724

1825
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
@@ -43,8 +50,14 @@ jobs:
4350
with:
4451
extra-packages: any::rcmdcheck
4552
needs: check
53+
error-on: '"note"'
4654
dependencies: '"hard"'
4755

56+
- uses: mxschmitt/action-tmate@v3
57+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
58+
with:
59+
limit-access-to-actor: true
60+
4861
- uses: r-lib/actions/check-r-package@v2
4962
with:
50-
args: 'c("--no-manual")' # "--as-cran" prevents to start external processes
63+
args: 'c("--no-manual", "--as-cran")'

.github/workflows/r-cmd-check.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
# r cmd check workflow of the mlr3 ecosystem v0.2.0
1+
# r cmd check workflow of the mlr3 ecosystem v0.4.0
22
# https://github.com/mlr-org/actions
3+
# modified to use supercharge/redis-github-action@1.7.0
34
on:
45
workflow_dispatch:
6+
inputs:
7+
debug_enabled:
8+
type: boolean
9+
description: 'Run the build with tmate debugging enabled'
10+
required: false
11+
default: false
512
push:
613
branches:
714
- main
@@ -44,7 +51,13 @@ jobs:
4451
with:
4552
extra-packages: any::rcmdcheck
4653
needs: check
54+
error-on: '"note"'
55+
56+
- uses: mxschmitt/action-tmate@v3
57+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
58+
with:
59+
limit-access-to-actor: true
4760

4861
- uses: r-lib/actions/check-r-package@v2
4962
with:
50-
args: 'c("--no-manual")' # "--as-cran" prevents to start external processes
63+
args: 'c("--no-manual", "--as-cran")'

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Suggests:
5656
emoa,
5757
fastGHQuad,
5858
lhs,
59+
mirai,
5960
mlr3learners (>= 0.7.0),
6061
mlr3pipelines (>= 0.5.2),
6162
nloptr,

R/OptimizerADBO.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@
6767
#' objective = objective,
6868
#' terminator = trm("evals", n_evals = 10))
6969
#'
70-
#' rush::rush_plan(n_workers=2)
70+
#' mirai::daemons(2)
71+
#' rush::rush_plan(n_workers=2, worker_type = "remote")
7172
#'
7273
#' optimizer = opt("adbo", design_size = 4, n_workers = 2)
7374
#'
7475
#' optimizer$optimize(instance)
76+
#' mirai::daemons(0)
7577
#' } else {
7678
#' message("Redis server is not available.\nPlease set up Redis prior to running the example.")
7779
#' }

R/OptimizerAsyncMbo.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@
8282
#' objective = objective,
8383
#' terminator = trm("evals", n_evals = 10))
8484
#'
85-
#' rush::rush_plan(n_workers=2)
85+
#' mirai::daemons(2)
86+
#' rush::rush_plan(n_workers=2, worker_type = "remote")
8687
#'
8788
#' optimizer = opt("async_mbo", design_size = 4, n_workers = 2)
8889
#'
8990
#' optimizer$optimize(instance)
91+
##' mirai::daemons(0)
9092
#' } else {
9193
#' message("Redis server is not available.\nPlease set up Redis prior to running the example.")
9294
#' }

R/TunerADBO.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@
5757
#' measure = measure,
5858
#' terminator = trm("evals", n_evals = 10))
5959
#'
60-
#' rush::rush_plan(n_workers=2)
60+
#' mirai::daemons(2)
61+
#' rush::rush_plan(n_workers=2, worker_type = "remote")
6162
#'
6263
#' tnr("adbo", design_size = 4, n_workers = 2)$optimize(instance)
64+
#' mirai::daemons(0)
6365
#' } else {
6466
#' message("Redis server is not available.\nPlease set up Redis prior to running the example.")
6567
#' }

R/TunerAsyncMbo.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@
5555
#' measure = measure,
5656
#' terminator = trm("evals", n_evals = 10))
5757
#'
58-
#' rush::rush_plan(n_workers=2)
58+
#' mirai::daemons(2)
59+
#' rush::rush_plan(n_workers=2, worker_type = "remote")
5960
#'
6061
#' tnr("async_mbo", design_size = 4, n_workers = 2)$optimize(instance)
62+
#' mirai::daemons(0)
6163
#' } else {
6264
#' message("Redis server is not available.\nPlease set up Redis prior to running the example.")
6365
#' }

man/mlr_optimizers_adbo.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mlr_optimizers_async_mbo.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)