Skip to content

Commit

Permalink
add github testing
Browse files Browse the repository at this point in the history
  • Loading branch information
JEFworks committed May 7, 2024
1 parent 6e53be2 commit 6ce4eb1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_FORCE_SUGGESTS_: false

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- 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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true

7 changes: 1 addition & 6 deletions tests/testthat/test-main.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
library(SEraster)
library(SpatialExperiment)
library(Matrix)
library(sf)

setwd("~/Desktop/SEraster")
devtools::load_all()


data("merfish_mousePOA")

resolution <- 100

data <- assay(merfish_mousePOA)
Expand Down Expand Up @@ -106,4 +102,3 @@ test_that("Correct structure of plotRaster output (ggplot)", {
expect_s3_class(out_plotRaster, "ggplot")
})

devtools::test()

0 comments on commit 6ce4eb1

Please sign in to comment.