name: tests on: push: #branches: [ develop ] env: RENV_PATHS_ROOT: ~/.local/share/renv jobs: test-on-latest-ubuntu: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: s-weigand/setup-conda@v1 - run : conda --version - run : source activate base - run : | sudo apt update sudo apt install libcurl4-openssl-dev sudo apt install libssl-dev sudo apt install libxml2-dev sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' sudo apt install r-base sudo apt install pandoc sudo Rscript --vanilla -e 'install.packages("rmarkdown", repos="http://cran.us.r-project.org")' conda env create -f environment.yml -n test-environment source activate test-environment - name: Cache packages uses: actions/cache@v1 with: path: ${{ env.RENV_PATHS_ROOT }} key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} restore-keys: | ${{ runner.os }}-renv- - name: Restore packages shell: Rscript {0} run: | if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") renv::restore() - run : bash tests/scripts/run_tests.sh all test