name: rworkflows

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

jobs:
  test-document-deploy:
    permissions: 
      contents: write
    runs-on: ${{ matrix.config.os }}
    name: ${{ matrix.config.os }} (${{ matrix.config.r }})
    container: ${{ matrix.config.cont }}
    strategy:
      fail-fast: false
      matrix:
        config:
          - { os: ubuntu-latest, r: 'devel', bioc: 'devel', cont: "bioconductor/bioconductor_docker:devel"}
          - { os: macOS-latest, r: 'latest', bioc: 'release'}
          - { os: windows-latest, r: 'latest', bioc: 'release'}  
    steps:  
      - uses: neurogenomics/rworkflows@master
        with:  
          run_bioccheck: true
          run_rcmdcheck: true
          has_testthat: true
          run_covr: true
          run_pkgdown: true
          has_runit: false 
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 
          run_docker: true
          docker_user: 'bschilder'
          docker_org: 'neurogenomicslab'
          DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} 
          runner_os: ${{ runner.os }}  
          
