Skip to content

Merge pull request #209 from marcelortizv/even-faster-did #54

Merge pull request #209 from marcelortizv/even-faster-did

Merge pull request #209 from marcelortizv/even-faster-did #54

Workflow file for this run

name: R-Package-Test
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install system dependencies
run: sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev libcurl4-openssl-dev
- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}-${{ matrix.config.r }}
restore-keys: |
${{ runner.os }}-r-${{ matrix.config.r }}-
${{ runner.os }}-r-
- name: Install R package dependencies
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
cmd.exe /c "R -e \"install.packages('devtools'); devtools::install_deps(dependencies = TRUE)\""
cmd.exe /c "R -e \"install.packages('remotes')\""
cmd.exe /c "R -e \"install.packages('callr')\""
else
R -e "install.packages('devtools'); devtools::install_deps(dependencies = TRUE)"
R -e "install.packages('remotes')"
R -e "install.packages('callr')"
fi
- name: Install did package
run: R CMD INSTALL .
- name: Run tests
run: |
R -e "devtools::test()"
R -e "testthat::test_dir('tests/testthat', reporter = 'check', package = 'did')"