Skip to content

Commit f3b6980

Browse files
committed
Merge branch 'main' into add/xml-upgrades/v11
2 parents 96c578f + 5cc88be commit f3b6980

File tree

166 files changed

+3541
-2523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+3541
-2523
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "monthly"

.github/workflows/check-standard.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
#branches: [main, master]
5+
branches: main
66
pull_request:
7-
branches: [main, master]
7+
branches: main
88

99
name: R-CMD-check
1010

@@ -42,7 +42,7 @@ jobs:
4242
R_KEEP_PKG_SOURCE: yes
4343

4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646

4747
- uses: r-lib/actions/setup-pandoc@v2
4848

@@ -70,11 +70,11 @@ jobs:
7070
name: Trigger SticsRTest check
7171
# Publish main when the test job succeeds and it's not a pull request.
7272
needs: R-CMD-check
73-
if: needs.R-CMD-check.result == 'success'
73+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.R-CMD-check.result == 'success'
7474
runs-on: ubuntu-latest
7575
steps:
7676
- name: Trigger
77-
uses: peter-evans/repository-dispatch@v2
77+
uses: peter-evans/repository-dispatch@v3
7878
with:
7979
token: ${{ secrets.TRIGGER_PAT }}
8080
repository: SticsRPacks/SticsRTests

.github/workflows/pkgdown.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
env:
1717
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- uses: r-lib/actions/setup-pandoc@v2
2222

@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Deploy to GitHub pages 🚀
3737
if: github.event_name != 'pull_request'
38-
uses: JamesIves/github-pages-deploy-action@v4.4.1
38+
uses: JamesIves/github-pages-deploy-action@v4.7.2
3939
with:
4040
clean: false
4141
branch: gh-pages

.github/workflows/style.yaml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
pull_request:
5+
paths:
6+
[
7+
"**.[rR]",
8+
"**.[qrR]md",
9+
"**.[rR]markdown",
10+
"**.[rR]nw",
11+
"**.[rR]profile",
12+
]
13+
workflow_dispatch:
14+
15+
name: style
16+
17+
permissions: read-all
18+
19+
jobs:
20+
style:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
pull-requests: write
25+
env:
26+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
27+
steps:
28+
- name: Checkout repo
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Setup R
34+
uses: r-lib/actions/setup-r@v2
35+
with:
36+
use-public-rspm: true
37+
38+
- name: Install dependencies
39+
uses: r-lib/actions/setup-r-dependencies@v2
40+
with:
41+
extra-packages: any::styler, any::roxygen2
42+
needs: styler
43+
44+
- name: Enable styler cache
45+
run: styler::cache_activate()
46+
shell: Rscript {0}
47+
48+
- name: Determine cache location
49+
id: styler-location
50+
run: |
51+
cat(
52+
"location=",
53+
styler::cache_info(format = "tabular")$location,
54+
"\n",
55+
file = Sys.getenv("GITHUB_OUTPUT"),
56+
append = TRUE,
57+
sep = ""
58+
)
59+
shell: Rscript {0}
60+
61+
- name: Cache styler
62+
uses: actions/cache@v4
63+
with:
64+
path: ${{ steps.styler-location.outputs.location }}
65+
key: ${{ runner.os }}-styler-${{ github.sha }}
66+
restore-keys: |
67+
${{ runner.os }}-styler-
68+
${{ runner.os }}-
69+
70+
- name: Style
71+
run: styler::style_pkg()
72+
shell: Rscript {0}
73+
74+
- name: Commit and push changes
75+
id: commit
76+
run: |
77+
if FILES_TO_COMMIT=($(git diff-index --name-only ${{ github.sha }} \
78+
| egrep --ignore-case '\.(R|[qR]md|Rmarkdown|Rnw|Rprofile)$'))
79+
then
80+
git config --local user.name "$GITHUB_ACTOR"
81+
git config --local user.email "[email protected]"
82+
git commit ${FILES_TO_COMMIT[*]} -m "Style code (GHA)"
83+
git pull --ff-only origin "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
84+
git push origin HEAD:"${GITHUB_HEAD_REF}"
85+
echo "changes_made=true" >> $GITHUB_OUTPUT
86+
echo "files_changed=${FILES_TO_COMMIT[*]}" >> $GITHUB_OUTPUT
87+
else
88+
echo "No changes to commit."
89+
echo "changes_made=false" >> $GITHUB_OUTPUT
90+
fi
91+
92+
- name: Comment on PR
93+
id: comment
94+
if: steps.commit.outputs.changes_made == 'true' && github.event_name == 'pull_request'
95+
uses: actions/github-script@v7
96+
with:
97+
github-token: ${{ secrets.GITHUB_TOKEN }}
98+
script: |
99+
const files = `${{ steps.commit.outputs.files_changed }}`.split(' ').join('\n- ');
100+
github.rest.issues.createComment({
101+
issue_number: context.issue.number,
102+
owner: context.repo.owner,
103+
repo: context.repo.repo,
104+
body: `📝 Styler has automatically formatted the following R files in this PR:\n- ${files}\n\nPlease pull these changes to your local branch.`
105+
})

.github/workflows/test-coverage.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- uses: r-lib/actions/setup-r@v2
2222
with:
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Upload test results
4747
if: failure()
48-
uses: actions/upload-artifact@v3
48+
uses: actions/upload-artifact@v4
4949
with:
5050
name: coverage-test-failures
5151
path: ${{ runner.temp }}/package

.github/workflows/update-citation-cff.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
env:
2323
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- uses: r-lib/actions/setup-r@v2
2727
- uses: r-lib/actions/setup-r-dependencies@v2
2828
with:

0 commit comments

Comments
 (0)