Skip to content

Version 0.3.0

Version 0.3.0 #52

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
TORCH_TEST: 1
TORCH_INSTALL: 1
TORCH_COMMIT_SHA: "none"
steps:
- uses: actions/checkout@v3
- 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
needs: coverage
- name: Install Miniconda
run: reticulate::install_miniconda()
shell: Rscript {0}
- name: Install Tensorflow + Keras deps
run: keras::install_keras(tensorflow = 'default-cpu')
shell: Rscript {0}
- name: Check if torch is installed
run: |
library(torch)
if (!torch_is_installed()) {
print("Torch is not installed!")
install_torch()
}
print(torch_randn(1))
shell: Rscript {0}
- name: Test coverage
run: |
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