-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
195f9e4
commit d84ac61
Showing
220 changed files
with
16,374 additions
and
2,215 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
pkgdown/ | ||
docs/ | ||
index.md | ||
.Rhistory | ||
_pkgdown.yml | ||
NEWS.md | ||
.github/ | ||
.git/ | ||
vignettes/ | ||
vignettes/* |
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,136 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
linux: | ||
name: ubuntu | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
r: [3.5] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: r-lib/actions/setup-r@master | ||
with: | ||
r-version: ${{matrix.r}} | ||
- uses: r-lib/actions/setup-pandoc@master | ||
|
||
- name: Install linux dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libfreetype6-dev libcurl4-openssl-dev libssl-dev libxml2-dev | ||
- name: Check R installation | ||
run: Rscript -e "print('R installation works!')" | ||
|
||
- name: Cache R packages | ||
id: cache-rp | ||
uses: actions/cache@v1 | ||
with: | ||
path: "/home/runner/work/_temp/Library" | ||
key: ${{ runner.os }}-cache-rp-$(ls /home/runner/work/_temp/Library/ | sha256sum) | ||
|
||
- name: Install R dependencies | ||
if: steps.cache-rp.outputs.cache-hit != 'true' | ||
run: | | ||
Rscript -e "install.packages(c('remotes','covr','rcmdcheck'))" | ||
Rscript -e "remotes::install_deps(pkgdir='.',dependencies=TRUE,repos='https://cran.rstudio.com/')" | ||
- name: RMD check and install package | ||
run: | | ||
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')" | ||
R CMD INSTALL . | ||
- name: Code coverage | ||
run: Rscript -e 'covr::codecov(token="${{ secrets.CODECOV_TOKEN }}",quiet=FALSE)' | ||
|
||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
r: [3.5,3.6] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: r-lib/actions/setup-r@master | ||
with: | ||
r-version: ${{matrix.r}} | ||
|
||
- name: Cache R packages | ||
id: cache-rp | ||
uses: actions/cache@v1 | ||
with: | ||
path: "C:/R/library" | ||
key: ${{ runner.os }}-cache-rp | ||
|
||
- name: Install R dependencies | ||
if: steps.cache-rp.outputs.cache-hit != 'true' | ||
run: | | ||
Rscript -e "install.packages(c('remotes','rcmdcheck','stringi'),lib='C:/R/library')" | ||
Rscript -e "remotes::install_deps(pkgdir='.',dependencies=TRUE,repos='https://cran.rstudio.com/',lib='C:/R/library')" | ||
Rscript -e "(print(.libPaths()))" | ||
- name: RMD check and install package | ||
run: | | ||
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')" | ||
R CMD INSTALL . | ||
pkgdown: | ||
needs: [mac, linux, windows] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: r-lib/actions/setup-r@master | ||
with: | ||
r-version: 3.6.2 | ||
- uses: r-lib/actions/setup-pandoc@master | ||
|
||
- name: Install linux dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libfreetype6-dev libcurl4-openssl-dev libssl-dev libxml2-dev | ||
- name: Check R installation | ||
run: Rscript -e "print('R installation works!')" | ||
|
||
- name: Cache R packages | ||
id: cache-rp | ||
uses: actions/cache@v1 | ||
with: | ||
path: "/home/runner/work/_temp/Library" | ||
key: ${{ runner.os }}-cache-rp-$(ls /home/runner/work/_temp/Library/ | sha256sum) | ||
|
||
- name: Install R dependencies | ||
if: steps.cache-rp.outputs.cache-hit != 'true' | ||
run: | | ||
Rscript -e "install.packages(c('remotes','rcmdcheck','pkgdown'))" | ||
Rscript -e "remotes::install_deps(pkgdir='.',dependencies=TRUE,repos='https://cran.rstudio.com/')" | ||
- name: RMD check and install package | ||
run: | | ||
Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')" | ||
R CMD INSTALL . | ||
- name: Render site, pull repo, copy folder, push repo | ||
run: | | ||
# Add git info | ||
git config --global user.email "do_not_email@example.com" | ||
git config --global user.name "gh_action" | ||
# Render website | ||
Rscript -e "pkgdown::build_site()" | ||
# Clone gh-pages branch | ||
git clone --single-branch --branch gh-pages "https://${{ secrets.TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" tmprepo | ||
cd tmprepo | ||
rm -rf * | ||
git add . | ||
git commit -m "Old contents deleted." | ||
cp -r ../docs/* . | ||
echo "Folder contents at $(pwd):" | ||
ls -lh | ||
# Push changes back | ||
git add . | ||
git commit -m "Updated contents at $(date +%Y%m%d-%H%M%S)" | ||
git push origin |
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
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
Oops, something went wrong.