Skip to content

Testing out package installs on automated scripts #91

Testing out package installs on automated scripts

Testing out package installs on automated scripts #91

Workflow file for this run

on:
push:
branches:
- master
pull_request:
name: shiny-tests
jobs:
automatedTests:
runs-on: ${{ matrix.config.os }}
name: ui-tests
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
permissions:
contents: read # for checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install odbc dependencies
run: sudo apt-get install unixodbc-dev
- name: restore renv
uses: r-lib/actions/setup-renv@v2
- name: Find PhantomJS path
id: phantomjs
run: |
echo "::set-output name=path::$(Rscript -e 'cat(shinytest:::phantom_paths()[[1]])')"
- name: Cache PhantomJS
uses: actions/cache@v1
with:
path: ${{ steps.phantomjs.outputs.path }}
key: ${{ runner.os }}-phantomjs
restore-keys: ${{ runner.os }}-phantomjs
- name: Install PhantomJS
shell: Rscript {0}
run: |
options(install.packages.check.source = "no")
if (!shinytest::dependenciesInstalled()) shinytest::installDependencies()
- name: Run tests
shell: Rscript {0}
run: |
shiny::runTests(".", assert = TRUE)
- name: Upload test results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-tests
path: tests