Skip to content

Run quick tests of pipeline #8

Run quick tests of pipeline

Run quick tests of pipeline #8

name: Run quick tests of pipeline
on:
pull_request:
branches:
- master
workflow_dispatch:
jobs:
run-tests:
runs-on: ubuntu-latest
container:
image: rocker/r-ver:4.1.0
options: --privileged
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Singularity
uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: 3.8.3
- name: Download Singularity container
run: |
singularity pull library://opain/genopred/genopred_pipeline:latest
- name: Set environment variables
run: |
echo "SIF_FILE=$GITHUB_WORKSPACE/genopred_pipeline_latest.sif" >> $GITHUB_ENV
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Install R dependencies
run: |
Rscript -e 'install.packages("testthat", repos="https://cran.rstudio.com/")'
Rscript -e 'install.packages("data.table", repos="https://cran.rstudio.com/")'
- name: Run tests
run: |
mkdir -p test_results
Rscript -e "testthat::test_dir('pipeline/tests/testthat')"
env:
SIF_FILE: ${{ env.SIF_FILE }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60