-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (75 loc) · 3.12 KB
/
python-package.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
# This workflow will install Python dependencies, run tests and lint for Python scripts
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Covid-19 DP submission CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [1.11]
python-version: [3.8]
vcf-validator-version: [0.9.4]
mongo-version: [4.0.21]
services:
db:
image: postgres
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
mongodb:
image: mongo:${{ matrix.mongo-version }}
ports:
- 27017:27017
steps:
- uses: actions/checkout@v2
- name: Setup Java JDK # Nextflow relies on JDK
uses: actions/setup-java@v1.4.3
# The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28
with:
java-version: ${{ matrix.java-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py install
- name: Set up Nextflow
run: |
sudo bash -c "export JAVA_CMD="$(which java)" && cd /usr/bin && (curl -s https://get.nextflow.io | bash) && chmod 755 nextflow"
/usr/bin/nextflow -version
- name: Set up VCF validator and assembly checker
run: |
sudo bash -c "cd /usr/bin && wget https://github.com/EBIvariation/vcf-validator/releases/download/v${{ matrix.vcf-validator-version }}/vcf_validator_linux && chmod 755 vcf_validator_linux"
sudo bash -c "cd /usr/bin && wget https://github.com/EBIvariation/vcf-validator/releases/download/v${{ matrix.vcf-validator-version }}/vcf_assembly_checker_linux && chmod 755 vcf_assembly_checker_linux"
- name: Set up BCFtools
run: |
sudo apt update
sudo apt -y install maven samtools bcftools parallel libbz2-dev liblzma-dev
- name: Set up ascp binary
# Might need to periodically update this URL
run: |
curl https://d3gcli72yxqn2z.cloudfront.net/connect_latest/v4/bin/ibm-aspera-connect_4.1.3.93_linux.tar.gz -o ibm-aspera-connect.tar.gz
tar xzvf ibm-aspera-connect.tar.gz
./ibm-aspera-connect_*_linux.sh
chmod +x ~/.aspera/connect/bin/ascp; sudo ln -s ~/.aspera/connect/bin/ascp /usr/bin
- name: Test with pytest
env:
EVA_STATS_DEV_PASSWORD: ${{ secrets.EVA_STATS_DEV_PASSWORD }}
run: |
export ASPERA_ID_DSA=~/.aspera/connect/etc/asperaweb_id_dsa.openssh
PYTHONPATH=. pytest tests
- name: Test bash script
run: |
tests/test_run_ingestion.sh