-
Notifications
You must be signed in to change notification settings - Fork 3
103 lines (100 loc) · 3.36 KB
/
Copy pathpython-app.yaml
File metadata and controls
103 lines (100 loc) · 3.36 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
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
name: MONSDA CI
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
workflow_dispatch:
inputs:
run_full_pipeline:
description: "Run full pipeline integration test"
required: false
default: false
type: boolean
jobs:
tests:
name: Unit tests (pytest)
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: monsda-test
environment-file: environment.yml
python-version: 3.12.2
channels: conda-forge,bioconda
allow-softlinks: true
channel-priority: flexible
show-channel-urls: true
use-only-tar-bz2: false
auto-activate-base: false
- name: build and install MONSDA
run: |
cd ${{ github.workspace }}
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pytest
- name: run unit tests
run: |
cd ${{ github.workspace }}
pytest -q tests/test_Utils.py
full-pipeline:
name: Full pipeline integration test
runs-on: ubuntu-latest
needs: tests
if: >-
(github.event_name == 'workflow_dispatch' && inputs.run_full_pipeline) ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full-pipeline'))
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: monsda-test
environment-file: environment.yml
python-version: 3.12.2
channels: conda-forge,bioconda
allow-softlinks: true
channel-priority: flexible
show-channel-urls: true
use-only-tar-bz2: false
auto-activate-base: false
- name: build and install MONSDA
run: |
cd ${{ github.workspace }}
python -m pip install --upgrade pip
python -m pip install -e .
- name: prepare integration test config
run: |
cd ${{ github.workspace }}
VERSION=$(monsda --version 2>&1 | sed 's/MONSDA version //g')
sed -i "s/\"VERSION\": \"FIXME\"/\"VERSION\": \"${VERSION}\"/g" tests/data/config_Test.json
- name: run full pipeline test
run: |
cd ${{ github.workspace }}/tests
ln -fs data/* .
mkdir -p CONDALIB
monsda -j 6 -c config_Test.json --directory ${PWD} --use-conda --conda-prefix CONDALIB --save
- name: upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: full-pipeline-debug-artifacts
path: |
${{ github.workspace }}/tests/LOGS
${{ github.workspace }}/tests/SUBSNAKES
${{ github.workspace }}/tests/FASTQ
${{ github.workspace }}/tests/MAPPED
${{ github.workspace }}/tests/QC
${{ github.workspace }}/tests/COUNTING
${{ github.workspace }}/tests/PEAKS
${{ github.workspace }}/tests/TRACKS