-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (51 loc) · 1.77 KB
/
roxygen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
name: Roxygen 📄
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
push:
branches:
- main
workflow_call:
concurrency:
group: roxygen-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
roxygen:
name: ${{ vars.CI_IMAGE }}
runs-on: ubuntu-latest
container:
image: ${{ vars.CI_IMAGE }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout project ⬇️
uses: actions/checkout@v4
- name: Install package dependencies 📄
uses: boehringer-ingelheim/dv.templates/.github/actions/dependencies@main
- name: Generate man pages 📄
run: |
Rscript -e 'roxygen2::roxygenize()'
if [[ -n $(git status -s | grep -E "man|DESCRIPTION") ]]
then
ROXYGEN_VERSION="$(Rscript -e 'packageVersion("roxygen2")' | awk '{print $NF}')"
echo "⚠️ Manuals are not up-to-date with roxygen comments!"
echo "Here are the differences:"
git diff man/* DESCRIPTION
echo -e "\n Please rerun the following command on your workstation and push your changes"
echo "--------------------------------------------------------------------"
echo "roxygen2::roxygenize('.')"
echo "--------------------------------------------------------------------"
echo "ℹ️ roxygen2 version that was used in this workflow: $ROXYGEN_VERSION"
echo "Please ensure that the 'RoxygenNote' field in the DESCRIPTION file matches this version"
exit 1
else
echo "👍 Manuals are up-to-date with roxygen comments"
fi
shell: bash