Test out R 4.4 upgrade (#301) #394
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
name: PACE-HRH Devtools build and test | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- 'pacehrh/**' | |
- '.github/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: mewu/rimage:pandoc | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Dependency | |
working-directory: 'tests/setup' | |
run: | | |
Rscript install_dep_for_tests.R | |
- name: Check package | |
run: | | |
echo y | apt-get update --allow-releaseinfo-change | |
echo y | apt-get install texinfo | |
echo y | apt-get install texlive-latex-base | |
echo y | apt-get install texlive-latex-extra | |
echo y | apt-get install texlive-fonts-recommended | |
echo y | apt install texlive-fonts-extra | |
R CMD check pacehrh --as-cran | |
- name: Run unittest | |
working-directory: 'pacehrh' | |
run: Rscript -e 'devtools::test()' | |
- name: Lint Check | |
working-directory: 'pacehrh' | |
run: > | |
install.packages("lintr"); | |
library(lintr); | |
devtools::load_all(); | |
expect_lint_free() | |
shell: Rscript {0} | |
env: | |
LINTR_ERROR_ON_LINT: true | |
NOT_CRAN: true | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: r_cmd_check_result | |
path: pacehrh.Rcheck/**/*.log | |