Skip to content

Improvements to installation routines #64

Improvements to installation routines

Improvements to installation routines #64

on:
push:
branches: main
pull_request:
branches: main
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
SPARK_VERSION: "3.5"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_HOST: "https://rstudio-partner-posit-default.cloud.databricks.com"
DATABRICKS_CLUSTER_ID: "1026-175310-7cpsh3g8"
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::covr
any::devtools
needs: coverage
- name: Cache Spark
id: cache-spark-2
uses: actions/cache@v2
with:
path: /home/runner/spark/spark-3.5.0-bin-hadoop3
key: sparklyr-spark-3.5.0-bin-hadoop3-2
- name: Install Spark (via sparklyr)
if: steps.cache-spark.outputs.cache-hit != 'true'
run: |
sparklyr::spark_install(version = "3.5.0")
shell: Rscript {0}
- name: Cache Scala
id: cache-scala
uses: actions/cache@v2
with:
path: /home/runner/scala/
key: scala-2
- name: Install Scala (via sparklyr)
if: steps.cache-scala.outputs.cache-hit != 'true'
run: |
sparklyr::download_scalac()
shell: Rscript {0}
- name: Test coverage
run: |
Sys.setenv("CODE_COVERAGE" = "true")
devtools::load_all()
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}
- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package