-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (129 loc) · 5.42 KB
/
test-stack.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Test BEDBASE stack
on:
workflow_dispatch:
inputs:
bedstat_branch:
description: 'bedstat branch to checkout'
required: true
default: 'master'
bedbuncher_branch:
description: 'bedbuncher branch to checkout'
required: true
default: 'master'
jobs:
pytest:
strategy:
matrix:
os: [ubuntu-latest] # can't use macOS when using service containers or container jobs
python-version: [3.6, 3.7, 3.8]
r-version: [release]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: bedbasepassword
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Checkout bedstat@${{ github.event.inputs.bedstat_branch }}
uses: actions/checkout@v2
with:
repository: databio/bedstat
ref: ${{ github.event.inputs.bedstat_branch }}
path: bedstat
- name: Checkout bedbuncher@${{ github.event.inputs.bedbuncher_branch }}
uses: actions/checkout@v2
with:
repository: databio/bedbuncher
ref: ${{ github.event.inputs.bedbuncher_branch }}
path: bedbuncher
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install bedstat dependancies
run: if [ -f bedstat/requirements/requirements-all.txt ]; then pip install -r bedstat/requirements/requirements-all.txt; fi
- name: Install bedstat dev dependancies
run: if [ -f bedstat/requirements/requirements-dev.txt ]; then pip install -r bedstat/requirements/requirements-dev.txt; fi
- name: Install bedstat test dependancies
run: if [ -f bedstat/requirements/requirements-test.txt ]; then pip install -r bedstat/requirements/requirements-test.txt; fi
- name: Install bedbuncher dependancies
run: if [ -f bedbuncher/requirements/requirements-all.txt ]; then pip install -r bedbuncher/requirements/requirements-all.txt; fi
- name: Install bedbuncher dev dependancies
run: if [ -f bedbuncher/requirements/requirements-dev.txt ]; then pip install -r bedbuncher/requirements/requirements-dev.txt; fi
- name: Install bedbuncher test dependancies
run: if [ -f bedbuncher/requirements/requirements-test.txt ]; then pip install -r bedbuncher/requirements/requirements-test.txt; fi
- name: Install libcurl
run: sudo apt-get install libcurl4-openssl-dev
- name: Install libpng
run: |
sudo wget http://se.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
sudo dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb
- name: Compile and install IGD
run: |
git clone https://github.com/databio/IGD.git
cd IGD
make
cd ..
echo "::add-path::$GITHUB_WORKSPACE/IGD/bin/"
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.r-version }}
- name: Install R dependancies
run: Rscript bedstat/scripts/installRdeps.R
- name: Run bedstat pipeline
run: looper run -p local ci/cfg/bedstat_config.yaml
- name: Test plots exist
run: |
if ls $GITHUB_WORKSPACE/outputs/bedstat_output/*/test_hg38*.png 1> /dev/null 2>&1; then
echo "SUCCESS";
else
echo "ERROR: files do not exist: $GITHUB_WORKSPACE/outputs/bedstat_output/*/test_hg38*.png";
exit 1
fi
- name: Test metadata exist
run: |
if ls $GITHUB_WORKSPACE/outputs/bedstat_output/*/test_hg38*.json 1> /dev/null 2>&1; then
echo "SUCCESS";
else
echo "ERROR: file does not exist: $GITHUB_WORKSPACE/outputs/bedstat_output/*/test_hg38.json";
exit 1
fi
- name: Test records in bedfiles table
run: python3 ci/scripts/count_records.py -t bedfiles -e 2
- name: Run bedbuncher pipeline
run: looper run -p local ci/cfg/bedbuncher_config.yaml
- name: Test metadata exist
run: |
if ls $GITHUB_WORKSPACE/outputs/bedbuncher_output/*/bedbase_demo_bedset.json 1> /dev/null 2>&1; then
echo "SUCCESS";
else
echo "ERROR: file does not exist: $GITHUB_WORKSPACE/outputs/bedbuncher_output/*/bedbase_demo_bedset.json";
exit 1
fi
- name: Test igd archive exists
run: |
if ls $GITHUB_WORKSPACE/outputs/bedbuncher_output/*/bedbase_demo_bedset_igd.tar.gz 1> /dev/null 2>&1; then
echo "SUCCESS";
else
echo "ERROR: file does not exist: $GITHUB_WORKSPACE/outputs/bedbuncher_output/*/bedbase_demo_bedset_igd.tar.gz";
exit 1
fi
- name: Test PEP archive exists
run: |
if ls $GITHUB_WORKSPACE/outputs/bedbuncher_output/*/bedbase_demo_bedset_PEP.tar.gz 1> /dev/null 2>&1; then
echo "SUCCESS";
else
echo "ERROR: file does not exist: $GITHUB_WORKSPACE/outputs/bedbuncher_output/*/bedbase_demo_bedset_PEP.tar.gz";
exit 1
fi
- name: Test records in bedsets table
run: python3 ci/scripts/count_records.py -t bedsets -e 1
- name: Test records in bedset_bedfiles
run: python3 ci/scripts/count_records.py -t bedset_bedfiles -e 2