fix factor to integer bug #36
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Reverse Dep Check | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| gtsummary: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev | |
| - name: Install and Cache Dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| # List the packages your script needs here | |
| extra-packages: | | |
| any::checked | |
| any::rlang | |
| any::cli | |
| # This key ensures that if you change the list above, | |
| # it creates a new cache rather than using an old one. | |
| cache-version: 1 | |
| - name: Check Reverse Dependencies | |
| shell: Rscript {0} | |
| run: | | |
| df <- | |
| checked::rev_dep_check_tasks_df( | |
| path = ".", | |
| repos = "https://packagemanager.posit.co/cran/latest", | |
| versions = c("dev", "release") | |
| ) | |
| df <- df[startsWith(df$alias, "gtsummary"), ] | |
| design <- | |
| checked::check_design$new( | |
| df = df, | |
| repos = "https://packagemanager.posit.co/cran/latest", | |
| output = tempdir(), | |
| restore = FALSE | |
| ) | |
| checked::run(design) | |
| checked::results(design) | |
| # Logic to check for errors and abort if found | |
| issues <- checked::results(design)$revdep_check_task_spec$gtsummary$errors$issues | |
| if (!rlang::is_empty(issues)) { | |
| cli::cli_abort( | |
| c("This PR newly breaks {.pkg gtsummary}", | |
| "!" = "The PR must be updated as to not break {.pkg gtsummary}.", | |
| "i" = "In rare cases where the break is acceptable, the change {.emph MUST} first be approved by Daniel Sjoberg (danieldsjoberg@gmail.com) {.emph before} this PR could potentially be merged." | |
| ) | |
| ) | |
| } |