-
Notifications
You must be signed in to change notification settings - Fork 24
73 lines (61 loc) · 2.17 KB
/
ancestry-conda.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
name: Run ancestry test with mamba profile
on:
workflow_call:
inputs:
ancestry-cache-key:
type: string
required: true
jobs:
test_mamba_ancestry:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Check out pipeline code
uses: actions/checkout@v4
- name: Set environment variables
run: |
echo "ANCESTRY_REF_DIR=$RUNNER_TEMP" >> $GITHUB_ENV
echo "ANCESTRY_TARGET_DIR=$RUNNER_TEMP" >> $GITHUB_ENV
- name: Restore reference data
uses: actions/cache/restore@v4
with:
path: |
${{ env.ANCESTRY_TARGET_DIR }}/GRCh38_HAPNEST_TARGET_ALL.pgen
${{ env.ANCESTRY_TARGET_DIR }}/GRCh38_HAPNEST_TARGET_ALL.psam
${{ env.ANCESTRY_TARGET_DIR }}/GRCh38_HAPNEST_TARGET_ALL.pvar.zst
${{ env.ANCESTRY_REF_DIR }}/GRCh38_HAPNEST_reference.tar.zst
key: ${{ inputs.ancestry-cache-key }}
fail-on-cache-miss: true
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge,bioconda,defaults
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: "3.10"
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: install nxf
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Set up test requirements
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r ${{ github.workspace }}/tests/requirements.txt
- name: Run ancestry test
run: TMPDIR=~ PROFILE=mamba pytest --kwdof --symlink --git-aware --wt 2 --tag "ancestry" --ignore tests/bin
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-singularity-ancestry
path: |
/home/runner/pytest_workflow_*/*/.nextflow.log
/home/runner/pytest_workflow_*/*/log.out
/home/runner/pytest_workflow_*/*/log.err