From 3a1cf6306cf026d316677fa4eff6f5ad68c546ce Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 23:14:08 -0800 Subject: [PATCH 1/4] don't try to install the package; just lint all changed files. --- .github/workflows/lint-changed-files.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint-changed-files.yaml b/.github/workflows/lint-changed-files.yaml index 1d4c2862..ac6d4022 100644 --- a/.github/workflows/lint-changed-files.yaml +++ b/.github/workflows/lint-changed-files.yaml @@ -19,27 +19,23 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: | + packages: | any::gh any::lintr any::purrr - needs: check - name: Add lintr options run: | cat('\noptions(lintr.linter_file = ".lintr")\n', file = "~/.Rprofile", append = TRUE) shell: Rscript {0} - - name: Install package - run: R CMD INSTALL . - - name: Extract and lint files changed by this PR run: | files <- gh::gh("GET https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files") changed_files <- purrr::map_chr(files, "filename") all_files <- list.files(recursive = TRUE) exclusions_list <- as.list(setdiff(all_files, changed_files)) - lintr::lint_package(exclusions = exclusions_list) + lintr::lint_dir(exclusions = exclusions_list) shell: Rscript {0} env: LINTR_ERROR_ON_LINT: true From c1e7009b4cb663e80c0a01a5b05023f35a210734 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 23:15:53 -0800 Subject: [PATCH 2/4] Increment version number to 1.2.0.9019 --- DESCRIPTION | 2 +- NEWS.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a059428a..4c57a17d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9018 +Version: 1.2.0.9019 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), diff --git a/NEWS.md b/NEWS.md index 87839e24..df55fcfd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -24,6 +24,8 @@ ## Internal changes +* Sped up `lint-changed-files` GitHub Action (#317) + * Added online preview builds for PRs that change the `pkgdown` website (#309) * Added `test-autoplot.pop_data` test (#234) From c4839792bbaee4405f0d7069c765e16b12e32e0a Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Mon, 4 Nov 2024 23:20:37 -0800 Subject: [PATCH 3/4] Increment version number to 1.2.0.9020 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4c57a17d..1265ce3a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9019 +Version: 1.2.0.9020 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), From 23bce03d737339d8a5a7696a2b9414fc4e0af285 Mon Sep 17 00:00:00 2001 From: Douglas Ezra Morrison Date: Tue, 5 Nov 2024 09:30:03 -0800 Subject: [PATCH 4/4] use `lint_package()` --- .github/workflows/lint-changed-files.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-changed-files.yaml b/.github/workflows/lint-changed-files.yaml index ac6d4022..f5a70aae 100644 --- a/.github/workflows/lint-changed-files.yaml +++ b/.github/workflows/lint-changed-files.yaml @@ -35,7 +35,7 @@ jobs: changed_files <- purrr::map_chr(files, "filename") all_files <- list.files(recursive = TRUE) exclusions_list <- as.list(setdiff(all_files, changed_files)) - lintr::lint_dir(exclusions = exclusions_list) + lintr::lint_package(exclusions = exclusions_list) shell: Rscript {0} env: LINTR_ERROR_ON_LINT: true