-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (83 loc) · 2.69 KB
/
juno_mapping_singularity.yaml
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
# Testing for pipeline python wrapper and scripts used inside rules
name: Singularity e2e test
on: [pull_request]
env:
KRAKEN_DEFAULT_DB: /mnt/kraken-database
jobs:
singularity_end_to_end:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest}
name: Singularity Juno_mapping pipeline ${{ matrix.config.os }}
steps:
- name: check space 1
shell: bash -l {0}
run: |
sudo chmod -R 777 /mnt
echo "Checking space: ."
df -h .
echo "Checking space: /mnt"
df -h /mnt
- uses: actions/checkout@v4
- uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: 3.8.3
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: false # see https://github.com/mamba-org/setup-micromamba/issues/130
cache-downloads: true
environment-file: envs/juno_mapping.yaml
environment-path: /mnt/juno_mapping
- name: Cache minikraken
id: cache-minikraken
uses: actions/cache@v3
with:
path: ${{ env.KRAKEN_DEFAULT_DB }}
key: minikraken-${{ runner.os }}
- name: Download k2 database
if: steps.cache-minikraken.outputs.cache-hit != 'true'
run: |
mkdir -pv ${{ env.KRAKEN_DEFAULT_DB }}
cd ${{ env.KRAKEN_DEFAULT_DB }}
curl -k https://genome-idx.s3.amazonaws.com/kraken/k2_viral_20220908.tar.gz > k2_viral_20220908.tar.gz
tar zxvf k2_viral_20220908.tar.gz
ls -lh
rm k2_viral_20220908.tar.gz
- name: Conda list
shell: bash -l {0}
run: conda list
- name: check space 2
shell: bash -l {0}
run: |
which singularity
singularity --version
df -h .
if [ -d /home/runner ]; then
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
fi
echo "Checking space: ."
df -h .
echo "Checking space: /mnt"
df -h /mnt
which singularity
singularity --version
- name: Test juno_mapping pipeline using singularity.
shell: bash -l {0}
run: pytest -v tests/test_pipeline_singularity.py
- name: Test the juno_mapping wrapper
shell: bash -l {0}
run: pytest -v tests/test_juno_mapping.py
- name: check space 3
if: always()
shell: bash -l {0}
run: |
echo "Checking space: ."
df -h .
echo "Checking space: /mnt"
df -h /mnt