Skip to content

Commit

Permalink
ci: Add R ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan committed Jan 2, 2025
1 parent ad74fc5 commit a8cdfcd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci-R.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI R

on:
push:
branches:
- main
- dev
pull_request:

permissions:
contents: read

env:
PIXI_COLOR: always
R_ENV: r-phylo2vec

jobs:
build_and_test:
name: R project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: ${{ env.R_ENV }}
- run: pixi run -e ${{ env.R_ENV }} test
3 changes: 3 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ r-devtools = ">=2.4.5,<3"

[feature.r.tasks.install-r]
cmd = "Rscript ./r-phylo2vec/scripts/install-package.R"

[feature.r.tasks.test]
cmd = "Rscript ./r-phylo2vec/scripts/run-tests.R"
3 changes: 3 additions & 0 deletions r-phylo2vec/scripts/run-tests.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pkg_path <- "./r-phylo2vec"

devtools::test(pkg_path, stop_on_failure = TRUE)

0 comments on commit a8cdfcd

Please sign in to comment.