Skip to content

Commit 696bf39

Browse files
committed
New data collected at 2025-11-17_00-03-15
1 parent e992afd commit 696bf39

40 files changed

Lines changed: 553 additions & 117 deletions

github-actions/formattable/R-CMD-check-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ jobs:
118118
with:
119119
cache-version: rcc-dev-${{ matrix.package }}-1
120120
needs: build, check
121-
extra-packages: "any::rcmdcheck any::remotes ."
121+
extra-packages: "any::rcmdcheck r-lib/remotes@f-618-universe ."
122122
token: ${{ secrets.GITHUB_TOKEN }}
123123

124124
- name: Install dev version of ${{ matrix.package }}
125125
env:
126126
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
127127
run: |
128-
remotes::install_dev("${{ matrix.package }}", "https://cloud.r-project.org", upgrade = "always")
128+
remotes::install_runiverse("${{ matrix.package }}", linux_distro = "noble")
129129
shell: Rscript {0}
130130

131131
- name: Session info

github-actions/formattable/R-CMD-check.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,20 @@ jobs:
142142
if: github.event_name != 'workflow_dispatch' || inputs.dep-suggests-matrix
143143
uses: ./.github/workflows/dep-suggests-matrix
144144

145+
- id: repo-state
146+
name: Determine repository state
147+
uses: ./.github/workflows/repo-state
148+
149+
# Styling on foreign PRs works through the format-suggest workflow
150+
- uses: ./.github/workflows/style
151+
if: steps.repo-state.outputs.foreign != 'true' || steps.repo-state.outputs.is_pr != 'true'
152+
153+
# Snapshot tests can't work in a way similar to format-suggests
154+
# because it requires running code which is a security risk on pull_request_target workflows
145155
- uses: ./.github/workflows/update-snapshots
146156
with:
147157
base: ${{ inputs.ref || github.head_ref }}
148158

149-
- uses: ./.github/workflows/style
150-
151159
- uses: ./.github/workflows/roxygenize
152160

153161
- name: Remove config files from previous iteration
@@ -175,7 +183,7 @@ jobs:
175183
echo -n "${{ steps.commit.outputs.sha }}" > rcc-smoke-sha.txt
176184
shell: bash
177185
178-
- uses: actions/upload-artifact@v4
186+
- uses: actions/upload-artifact@v5
179187
with:
180188
name: rcc-smoke-sha
181189
path: rcc-smoke-sha.txt
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: commit-suggest.yaml
2+
3+
on:
4+
workflow_run:
5+
workflows: ["rcc"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
commit-suggest:
15+
runs-on: ubuntu-latest
16+
if: github.event.workflow_run.event == 'pull_request'
17+
18+
steps:
19+
- name: Show event payload
20+
run: |
21+
echo '${{ toJson(github.event) }}' | jq .
22+
shell: bash
23+
24+
- name: Checkout PR
25+
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ github.event.workflow_run.head_sha }}
28+
29+
- name: Download artifact
30+
uses: actions/download-artifact@v6
31+
with:
32+
name: changes-patch
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
run-id: ${{ github.event.workflow_run.id }}
35+
continue-on-error: true
36+
37+
- name: Check if artifact exists
38+
id: check-artifact
39+
run: |
40+
if [ -f changes.patch ]; then
41+
echo "has_diff=true" >> $GITHUB_OUTPUT
42+
else
43+
echo "has_diff=false" >> $GITHUB_OUTPUT
44+
echo "No changes-patch artifact found"
45+
fi
46+
shell: bash
47+
48+
- name: Find PR number for branch from correct head repository
49+
id: find-pr
50+
env:
51+
GITHUB_TOKEN: ${{ github.token }}
52+
run: |
53+
PR_NUMBER=$(gh pr list --head ${{ github.event.workflow_run.head_branch }} --state open --json number,headRepositoryOwner --jq '.[] | select(.headRepositoryOwner.login == "${{ github.event.workflow_run.head_repository.owner.login }}") | .number' || echo "")
54+
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
55+
shell: bash
56+
57+
- name: Generate comment body
58+
if: steps.check-artifact.outputs.has_diff == 'true'
59+
id: comment-body
60+
run: |
61+
cat << 'EOF' > comment.md
62+
## Formatting suggestions available
63+
64+
A patch file with formatting suggestions has been generated. You can apply it using one of these methods:
65+
66+
### Method 1: Apply via gh CLI
67+
68+
```bash
69+
# Download and apply the patch directly
70+
gh run download ${{ github.event.workflow_run.id }} --repo ${{ github.repository }} --name changes-patch && patch -p1 < changes.patch && rm changes.patch
71+
```
72+
73+
### Method 2: View the patch
74+
75+
<details>
76+
<summary>Click to see the patch contents</summary>
77+
78+
```diff
79+
EOF
80+
81+
cat changes.patch >> comment.md
82+
83+
cat << 'EOF' >> comment.md
84+
```
85+
86+
</details>
87+
88+
---
89+
*This comment was automatically generated by the commit-suggester workflow.*
90+
EOF
91+
shell: bash
92+
93+
- name: Post or update comment
94+
if: steps.check-artifact.outputs.has_diff == 'true'
95+
uses: thollander/actions-comment-pull-request@v3
96+
with:
97+
pr-number: ${{ steps.find-pr.outputs.pr_number }}
98+
file-path: comment.md
99+
comment-tag: formatting-suggestions
100+
mode: recreate
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Workflow derived from https://github.com/posit-dev/setup-air/tree/main/examples
2+
3+
on:
4+
# Using `pull_request_target` over `pull_request` for elevated `GITHUB_TOKEN`
5+
# privileges, otherwise we can't set `pull-requests: write` when the pull
6+
# request comes from a fork, which is our main use case (external contributors).
7+
#
8+
# `pull_request_target` runs in the context of the target branch (`main`, usually),
9+
# rather than in the context of the pull request like `pull_request` does. Due
10+
# to this, we must explicitly checkout `ref: ${{ github.event.pull_request.head.sha }}`.
11+
# This is typically frowned upon by GitHub, as it exposes you to potentially running
12+
# untrusted code in a context where you have elevated privileges, but they explicitly
13+
# call out the use case of reformatting and committing back / commenting on the PR
14+
# as a situation that should be safe (because we aren't actually running the untrusted
15+
# code, we are just treating it as passive data).
16+
# https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
17+
pull_request_target:
18+
19+
name: format-suggest.yaml
20+
21+
jobs:
22+
format-suggest:
23+
name: format-suggest
24+
runs-on: ubuntu-latest
25+
# Only run this job if changes come from a fork.
26+
# We commit changes directly on the main repository.
27+
if: github.event.pull_request.head.repo.full_name != github.repository
28+
29+
permissions:
30+
# Required to push suggestion comments to the PR
31+
pull-requests: write
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
ref: ${{ github.event.pull_request.head.sha }}
37+
38+
- uses: ./.github/workflows/style
39+
40+
- name: Suggest
41+
uses: reviewdog/action-suggester@v1
42+
with:
43+
level: error
44+
fail_level: error
45+
tool_name: air-and-clang-format
Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Run tests in random order
21
on:
32
push:
43
branches: [main, master]
@@ -18,61 +17,18 @@ jobs:
1817

1918
- uses: r-lib/actions/setup-r@v2
2019
with:
21-
#r-version: "devel"
2220
use-public-rspm: true
2321

2422
- uses: r-lib/actions/setup-r-dependencies@v2
2523
with:
26-
pak-version: devel
27-
upgrade: "TRUE"
28-
extra-packages: |
29-
local::.
30-
needs: check
24+
extra-packages: local::.
3125

3226
- name: Run Tests in Random Order
3327
run: |
3428
options(crayon.enabled = TRUE)
3529
withr::local_envvar(TESTTHAT_PARALLEL = "FALSE")
36-
library(cli)
37-
library(glue)
38-
library(testthat)
39-
pkgload::load_all(".", quiet = TRUE)
40-
test_script_paths <- testthat::find_test_scripts("tests/testthat")
4130
seed <- sample.int(1e6, 1L)
42-
cli_inform("Chosen seed for the current test run: {seed}")
31+
cli::cli_inform("Chosen seed for the current test run: {seed}")
4332
set.seed(seed)
44-
randomized_test_script_paths <- sample(test_script_paths)
45-
any_test_failures <- FALSE
46-
any_test_errors <- FALSE
47-
test_path <- function(path) {
48-
report <- as.data.frame(testthat::test_file(path, reporter = "silent"))
49-
has_test_failures <- any(report$failed == 1L)
50-
has_test_errors <- any(report$error == 1L)
51-
if (has_test_failures) {
52-
cli_alert_danger(glue("Tests in `{path}` are failing."))
53-
any_test_failures <<- TRUE
54-
}
55-
if (has_test_errors) {
56-
cli_alert_danger(glue("There was error while running tests in `{path}`."))
57-
any_test_errors <<- TRUE
58-
}
59-
if (!has_test_failures && !has_test_errors) {
60-
cli_alert_success(glue("All tests passing in `{path}`."))
61-
}
62-
}
63-
cli_rule()
64-
cli_inform("Running tests in random order:")
65-
cli_rule()
66-
purrr::walk(randomized_test_script_paths, test_path)
67-
cli_rule()
68-
if (any_test_failures) {
69-
cli_abort("Tests in some files are failing. Check the log.")
70-
}
71-
if (any_test_errors) {
72-
cli_abort("There was error while running tests in some files. Check the log.")
73-
}
74-
if (!any_test_failures && !any_test_errors) {
75-
cli_alert_success("Tests from all files are passing!")
76-
}
77-
cli_rule()
33+
testthat::test_dir("tests", shuffle = TRUE)
7834
shell: Rscript {0}

github-actions/ggstatsplot/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Deploy to GitHub pages 🚀
5050
if: github.event_name != 'pull_request'
51-
uses: JamesIves/github-pages-deploy-action@v4.7.3
51+
uses: JamesIves/github-pages-deploy-action@v4.7.4
5252
with:
5353
branch: gh-pages
5454
folder: docs

github-actions/ggstatsplot/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
- name: Run pre-commit
2626
uses: pre-commit/action@v3.0.1
2727

28-
- uses: stefanzweifel/git-auto-commit-action@v6.0.1
28+
- uses: stefanzweifel/git-auto-commit-action@v7.0.0

github-actions/ggstatsplot/styler.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ jobs:
6565
styler::style_pkg()
6666
shell: Rscript {0}
6767

68-
- uses: stefanzweifel/git-auto-commit-action@v6.0.1
68+
- uses: stefanzweifel/git-auto-commit-action@v7.0.0

github-actions/here/R-CMD-check-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ jobs:
118118
with:
119119
cache-version: rcc-dev-${{ matrix.package }}-1
120120
needs: build, check
121-
extra-packages: "any::rcmdcheck any::remotes ."
121+
extra-packages: "any::rcmdcheck r-lib/remotes@f-618-universe ."
122122
token: ${{ secrets.GITHUB_TOKEN }}
123123

124124
- name: Install dev version of ${{ matrix.package }}
125125
env:
126126
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
127127
run: |
128-
remotes::install_dev("${{ matrix.package }}", "https://cloud.r-project.org", upgrade = "always")
128+
remotes::install_runiverse("${{ matrix.package }}", linux_distro = "noble")
129129
shell: Rscript {0}
130130

131131
- name: Session info

github-actions/here/R-CMD-check.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,20 @@ jobs:
142142
if: github.event_name != 'workflow_dispatch' || inputs.dep-suggests-matrix
143143
uses: ./.github/workflows/dep-suggests-matrix
144144

145+
- id: repo-state
146+
name: Determine repository state
147+
uses: ./.github/workflows/repo-state
148+
149+
# Styling on foreign PRs works through the format-suggest workflow
150+
- uses: ./.github/workflows/style
151+
if: steps.repo-state.outputs.foreign != 'true' || steps.repo-state.outputs.is_pr != 'true'
152+
153+
# Snapshot tests can't work in a way similar to format-suggests
154+
# because it requires running code which is a security risk on pull_request_target workflows
145155
- uses: ./.github/workflows/update-snapshots
146156
with:
147157
base: ${{ inputs.ref || github.head_ref }}
148158

149-
- uses: ./.github/workflows/style
150-
151159
- uses: ./.github/workflows/roxygenize
152160

153161
- name: Remove config files from previous iteration
@@ -175,7 +183,7 @@ jobs:
175183
echo -n "${{ steps.commit.outputs.sha }}" > rcc-smoke-sha.txt
176184
shell: bash
177185
178-
- uses: actions/upload-artifact@v4
186+
- uses: actions/upload-artifact@v5
179187
with:
180188
name: rcc-smoke-sha
181189
path: rcc-smoke-sha.txt

0 commit comments

Comments
 (0)