Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for checking a package in a subdirectory #6

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/recheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
type: string
default: strong
required: false
subdirectory:
description: Subdirectory of R package to be checked
required: false
type: string
default: ''

env:
R_LIBS_USER: ${{github.workspace}}/pkglib
Expand All @@ -32,24 +37,29 @@ jobs:
mkdir -p $R_LIBS_USER
R -e ".libPaths()"

# - name: clone
# run: git clone --depth=1 https://github.com/${{github.repository}} source

Comment on lines -35 to -37
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to remove this while I was in here, although it's unrelated.

- name: checkout
uses: actions/checkout@v4
with:
path: source

- name: Set package source directory
run: |
if [ -n "${{ github.event.inputs.subdirectory }}" ]; then
echo "PKG_SOURCE_DIR=source/${{ github.event.inputs.subdirectory }}" >> $GITHUB_ENV
else
echo "PKG_SOURCE_DIR=source" >> $GITHUB_ENV
fi

- name: download dependencies
run: rechecktools::install_recheck_deps('source', '${{inputs.which}}')
run: rechecktools::install_recheck_deps('${{env.PKG_SOURCE_DIR}}', '${{inputs.which}}')
shell: Rscript {0}

- name: build source package
run: |
mkdir newpkg
R CMD build source
R CMD build ${{env.PKG_SOURCE_DIR}}
mv *.tar.gz newpkg/
rm -Rf source
rm -Rf ${{env.PKG_SOURCE_DIR}}

- name: Get old version of package
shell: Rscript {0}
Expand Down Expand Up @@ -142,4 +152,3 @@ jobs:
} else {
cat("No changes between old and new version\n")
}