Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a CI system #11

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
60 changes: 60 additions & 0 deletions .github/workflows/r-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ${{matrix.config.os}}

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

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

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- name: Set up Unix
if: runner.os == 'Linux'
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev

- name: Set up MacOS
if: runner.os == 'macOS'
run: brew install curl glib-openssl harfbuzz fribidi

- name: Set up windows
if: runner.os == 'Windows'
run: choco install curl openssl

- name: Set up R ${{ matrix.config.r }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- name: Install dependencies
run: |
install.packages("devtools")
library(devtools)
shell: Rscript {0}

- name: Install VariantSurvival
run: |
devtools::install_github("collaborativebioinformatics/VariantSurvival/VariantSurvival_package")
library(VariantSurvival)
shell: Rscript {0}