'name': rworkflows
## 'on' must be in quotes to avoid being evaulated as TRUE
'on':
  push:
    branches: [main, master, devel, 'RELEASE_**']
  pull_request:
    branches: [main, master, devel, 'RELEASE_**']
'jobs':
  rworkflows:
    permissions: write-all
    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: 
      #### Install nodejs for act ####
      - if: ${{ env.ACT }}
        name: Hack container for local development
        run: |
            curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
            sudo apt-get install -y nodejs
        shell: bash {0} 
      #### Check master branch ####
      - uses: neurogenomics/rworkflows@master
        with:
          run_bioccheck: false
          run_rcmdcheck: true
          as_cran: true
          run_vignettes: true
          has_testthat: true
          run_covr: true
          run_pkgdown: true
          has_runit: false
          has_latex: false
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 
          run_docker: true
          docker_user: 'bschilder'
          docker_org: 'neurogenomicslab'
          DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} 
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 
          runner_os: ${{ runner.os }} 
          cache_version: cache-master
          ncpus: 2
