-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test pakage generation * Tweak * Tweak * Fix a mistake * Install devtools
- Loading branch information
1 parent
442250d
commit eb4dd6f
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: Generate R package using savvy | ||
|
||
jobs: | ||
generate_pkg: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@nightly | ||
if: matrix.config.rust == 'nightly' | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: | | ||
any::rcmdcheck | ||
any::devtools | ||
any::usethis | ||
working-directory: R-package # this isn't the actual R package, but this is needed to avoid an error | ||
|
||
- name: create tempdir | ||
run: echo "TEMP_DIR=$(mktemp -d)" >> ${GITHUB_ENV} | ||
|
||
- name: create package | ||
run: | | ||
Rscript -e "usethis::create_package('${{ env.TEMP_DIR }}/sawy')" | ||
cargo run --manifest-path ./savvy-cli/Cargo.toml -- init ${{ env.TEMP_DIR }}/sawy | ||
cd ${{ env.TEMP_DIR }}/sawy | ||
Rscript -e "usethis::use_mit_license('foo')" | ||
Rscript -e "devtools::document()" | ||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
args: 'c("--no-manual")' | ||
working-directory: ${{ env.TEMP_DIR}}/sawy |