Add MIT License to the project #16
This file contains hidden or 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
| # .github/workflows/test-package.yml | |
| # Simple R package testing workflow | |
| name: Test Package | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| use-public-rspm: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev | |
| - name: Install R dependencies | |
| run: | | |
| install.packages(c( | |
| "remotes", | |
| "testthat", | |
| "devtools", | |
| "ggplot2", | |
| "metafor", | |
| "oro.nifti", | |
| "neurobase", | |
| "reshape2", | |
| "pwr", | |
| "ggbeeswarm", | |
| "grid", | |
| "grDevices", | |
| "graphics", | |
| "utils", | |
| "colorspace", | |
| "png" | |
| )) | |
| remotes::install_deps(dependencies = TRUE) | |
| shell: Rscript {0} | |
| - name: Run tests | |
| run: | | |
| # Load the package | |
| devtools::load_all() | |
| # Run tests | |
| devtools::test() | |
| cat("All package tests completed!\n") | |
| shell: Rscript {0} | |
| - name: Check package | |
| run: | | |
| devtools::check(error_on = "warning") | |
| shell: Rscript {0} |