diff --git a/.github/workflows/main_check.yml b/.github/workflows/main_check.yml index 334a607..488bf99 100644 --- a/.github/workflows/main_check.yml +++ b/.github/workflows/main_check.yml @@ -7,19 +7,21 @@ # additional example workflows available for the R community. +name: R-CMD-check + on: - push: - branches: [ "main" ] pull_request: + types: closed branches: [ "main" ] permissions: contents: read -name: github_workflow jobs: R-CMD-check: + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) @@ -35,32 +37,39 @@ jobs: - {os: ubuntu-latest, r: 'oldrel-1'} steps: - # remove vignettes dir + - name: Remove vignettes dir run: rm -rf 'vignettes/' shell: bash - # checkout repo for workflow access - - uses: actions/checkout@v2 + - name: Checkout repo for workflow access + uses: actions/checkout@v3 - # setup R - - uses: r-lib/actions/setup-r@v2 + - name: Set up R environment + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - # setup dependencies - - uses: r-lib/actions/setup-r-dependencies@v2 + - name: Set up dependencies (general) + uses: r-lib/actions/setup-r-dependencies@v2 env: _R_CHECK_FORCE_SUGGESTS: false _R_CHECK_RD_XREFS: false with: dependencies: '"hard"' # do not use suggested dependencies - extra-packages: any::rcmdcheck, any::testthat, any::data.table + extra-packages: any::rcmdcheck, any::testthat, any::rlang, any::R.utils, any::remotes - # run R CMD check - - uses: r-lib/actions/check-r-package@v2 + - name: Set up dependencies (GiottoData) + run: | + suppressWarnings({ + remotes::install_github('drieslab/GiottoData@suite_modular', build = FALSE) + }) + shell: Rscript {0} + + - name: Run R CMD check + uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true error-on: '"error"' # workflow errors on error only, can change to include warnings @@ -71,66 +80,11 @@ jobs: run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true shell: bash - 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: Test coverage - run: | - covr::codecov( - quiet = FALSE, - clean = FALSE, - install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") - ) - shell: Rscript {0} - - # add code cov - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - # lint: - # 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::lintr, local::. - # needs: lint - # - # - name: Lint - # run: lintr::lint_package() - # shell: Rscript {0} - # env: - # LINTR_ERROR_ON_LINT: true # render-rmarkdown: + # name: Update README.Rmd # runs-on: ubuntu-latest - # env: - # GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} # steps: # - name: Checkout repo # uses: actions/checkout@v3 @@ -153,3 +107,6 @@ jobs: # run: | # git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit" # git push origin || echo "No changes to commit" + + + diff --git a/README.Rmd b/README.Rmd index c6f5654..51d93d6 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,7 +18,7 @@ knitr::opts_chunk$set( ![Version](https://img.shields.io/github/r-package/v/drieslab/GiottoVisuals) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) -[![Codecov test coverage](https://codecov.io/gh/jiajic/GiottoVisuals/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jiajic/GiottoVisuals?branch=main) +[![codecov](https://codecov.io/github/drieslab/GiottoVisuals/graph/badge.svg?token=F4ga1Ahbhw)](https://codecov.io/github/drieslab/GiottoVisuals) [![R-CMD-check](https://github.com/drieslab/GiottoVisuals/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/drieslab/GiottoVisuals/actions/workflows/R-CMD-check.yml) [![GitHub issues](https://img.shields.io/github/issues/drieslab/Giotto)](https://github.com/drieslab/Giotto/issues) [![GitHub pulls](https://img.shields.io/github/issues-pr/drieslab/GiottoVisuals)](https://github.com/drieslab/GiottoVisuals/pulls) diff --git a/README.md b/README.md index 734fbeb..c7ab52e 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,7 @@ ![Version](https://img.shields.io/github/r-package/v/drieslab/GiottoVisuals) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) -[![Codecov test -coverage](https://codecov.io/gh/jiajic/GiottoVisuals/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jiajic/GiottoVisuals?branch=main) +[![codecov](https://codecov.io/github/drieslab/GiottoVisuals/graph/badge.svg?token=F4ga1Ahbhw)](https://codecov.io/github/drieslab/GiottoVisuals) [![R-CMD-check](https://github.com/drieslab/GiottoVisuals/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/drieslab/GiottoVisuals/actions/workflows/R-CMD-check.yml) [![GitHub issues](https://img.shields.io/github/issues/drieslab/Giotto)](https://github.com/drieslab/Giotto/issues)