Skip to content

Better way to check for tensorflow (#53) #83

Better way to check for tensorflow (#53)

Better way to check for tensorflow (#53) #83

# 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
pull_request:
branches: main
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
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 reticulate
run: pak::pak('reticulate')
shell: Rscript {0}
- name: Install Miniconda
run: |
reticulate::install_miniconda()
shell: Rscript {0}
- name: Find Miniconda on macOS
if: runner.os == 'macOS'
run: echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile
- name: Install TensorFlow
run: |
reticulate::conda_create('r-reticulate', packages = c('python==3.6.9'))
tensorflow::install_tensorflow(version='2.4.0')
shell: Rscript {0}
- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}