-
Notifications
You must be signed in to change notification settings - Fork 3
executable file
·83 lines (71 loc) · 2.47 KB
/
test_pipelines.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
name: Python package
on: [push, pull_request]
jobs:
setup_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
test: ["test_config_generation"]
test-case: ["atac", "chip-rx", "chip", "rna-rx", "rna", "snp"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache conda environment
id: cache-conda
uses: actions/cache@v3
with:
path: |
~/miniforge3/envs/test
~/.cache/pip
key: ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ hashFiles('**/testing.yml') }}
restore-keys: |
${{ runner.os }}-conda-${{ matrix.python-version }}-
- name: Setup environment
if: steps.cache-conda.outputs.cache-hit != 'true'
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-activate-base: true
channel-priority: strict
channels: conda-forge, bioconda, defaults
conda-solver: mamba
environment-file: testing.yml
environment-name: test
mamba-version: latest
miniforge-variant: Mambaforge
python-version: ${{ matrix.python-version }}
use-mamba: true
use-only-tar-bz2: true
- name: Update environment
if: steps.cache-conda.outputs.cache-hit != 'true'
run: mamba env update -n test -f testing.yml
- name: list conda envs
run: |
conda env list
env_path="/home/runner/miniconda3/envs/test"
if [ -d "$env_path" ]; then
echo "Environment exists"
else
echo "Environment does not exist"
fi
shell: bash -l {0}
- name: Install package
if: steps.cache-conda.outputs.cache-hit != 'true'
run: |
source /home/runner/miniforge3/bin/activate test
pip install .
shell: bash -l {0}
# - name: Verify and activate environment
# run: |
# source ~/miniforge3/bin/activate test
# which seqnado
# shell: bash -l {0}
# - name: Run test
# run: |
# source ~/miniforge3/bin/activate test
# pytest "tests/test_pipelines.py::${{ matrix.test }}[${{ matrix.test-case }}]" -vv -s --cores 4 -k
# shell: bash -l {0}