Skip to content

fore ceplaclemt of documentation index #60

fore ceplaclemt of documentation index

fore ceplaclemt of documentation index #60

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
name: test-coverage
permissions: read-all
jobs:
test-coverage:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- 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
any::xml2
any::testthat
any::BiocNeighbors
any::pkgdown
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install anndata
pip install numpy
env:
RETICULATE_PYTHON: /opt/hostedtoolcache/Python/3.8.10/x64/bin/python
- name: Build pkgdown site
run: |
pkgdown::build_site()
file.copy("docs/Readme.html", "docs/index.html", overwrite = TRUE)
shell: Rscript {0}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov, file = "coverage.xml")
shell: Rscript {0}
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./coverage.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Show testthat output
if: always()
run: |
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package