forked from opain/GenoPred
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.63 KB
/
run_quick_tests.yaml
File metadata and controls
55 lines (46 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
else
echo "BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
fi
- 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/")'
Rscript -e 'install.packages("R.utils", repos="https://cran.rstudio.com/")'
- name: Run tests
run: |
Rscript -e "testthat::test_dir('pipeline/tests/testthat')"
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
SIF_FILE: ${{ env.SIF_FILE }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60