Skip to content

Update main.yml

Update main.yml #5

Workflow file for this run

name: GitHub Actions Demo
on: [push]
jobs:
xeredar-checking:
name: ${{ github.actor }} is checking the xeredar package 🚀
runs-on: ubuntu-latest
container:
image: rstudio/r-base:4.3-noble
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: Rscript -e "devtools::install()"
- name: Show session info
run: Rscript -e "devtools::session_info()"
- name: Check style
run: Rscript -e "Sys.setenv(LINTR_COMMENT_BOT=FALSE); lintr::lint_package()"
- name: Run R CMD CHECK
run: Rscript -e "devtools::check(args = c('--timings','--no-tests'), env_vars = c('_R_CHECK_LICENSE_'=FALSE))"
- name: Create coverage report
run: Rscript -e "covr::package_coverage()"
- name: Extract coverage percentage
id: coverage
run: |
COVERAGE=$(grep -oP '^.*Coverage: \K\d+\.\d+(?=%)' coverage.txt)
echo "::set-output name=coverage::$COVERAGE"