-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from jiajic/dev
Edit workflows
- Loading branch information
Showing
7 changed files
with
198 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
|
||
name: code coverage | ||
|
||
on: | ||
push: | ||
branches: [ "dev" ] | ||
pull_request: | ||
types: closed | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '16 20 * * 2' | ||
|
||
jobs: | ||
test-coverage: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
|
||
- name: Checkout repo for workflow access | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up R environment | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- 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::rlang, any::R.utils, any::remotes, any::covr | ||
needs: coverage | ||
|
||
- name: Set up dependencies (GiottoData) | ||
run: | | ||
suppressWarnings({ | ||
remotes::install_github('drieslab/GiottoData@suite_modular', build = FALSE) | ||
}) | ||
shell: Rscript {0} | ||
|
||
- name: Generate coverage report | ||
run: | | ||
covr::codecov( | ||
quiet = FALSE, | ||
clean = FALSE, | ||
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") | ||
) | ||
shell: Rscript {0} | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: 4c596b03-f583-4114-8c3a-f89ed373c53b | ||
fail_ci_if_error: false | ||
flags: unittests | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# | ||
# See https://github.com/r-lib/actions/tree/master/examples#readme for | ||
# additional example workflows available for the R community. | ||
|
||
|
||
name: Dev Workflow - Test and check | ||
on: | ||
push: | ||
branches: [ "dev" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
R-CMD-check: | ||
name: R CMD Check | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Remove vignettes dir | ||
run: rm -rf 'vignettes/' | ||
shell: bash | ||
|
||
- name: Checkout repo for workflow access | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up R environment | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- 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::rlang, any::R.utils, any::remotes | ||
|
||
- 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 | ||
|
||
# show testthat output for ease of access | ||
- name: Show testthat output | ||
if: always() | ||
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# lintr provides static code analysis for R. | ||
# It checks for adherence to a given style, | ||
# identifying syntax errors and possible semantic issues, | ||
# then reports them to you so you can take action. | ||
# More details at https://lintr.r-lib.org/ | ||
|
||
name: lintr | ||
|
||
on: | ||
push: | ||
branches: [ "dev" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "dev" ] | ||
schedule: | ||
- cron: '16 20 * * 2' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lintr: | ||
name: Run lintr scanning | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read # for checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up R environment | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- name: Set up dependencies | ||
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::lintr, local::. | ||
needs: lint | ||
|
||
- name: Run lintr | ||
run: lintr::sarif_output(lintr::lint_dir("."), "lintr-results.sarif") | ||
shell: Rscript {0} | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: lintr-results.sarif | ||
wait-for-processing: true |
Oops, something went wrong.