-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (79 loc) · 2.32 KB
/
github_tests.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
84
85
86
87
88
89
90
name: Integration Tests & Code Style
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
$CONDA/bin/conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
$CONDA/bin/flake8 src/marbel/
- name: Run tests with pytest
run: |
$CONDA/bin/pytest tests --doctest-modules --cov=src/marbel --cov-report=xml
- name: Convert coverage to lcov format
run: |
$CONDA/bin/coverage lcov
# - name: Send coverage report to Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: "coverage.lcov"
tests-functional:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python
uses: actions/setup-python@v2
- name: Create conda env
run: |
conda create -n marbel python=3.10 r-base
- name: Install the package
run: |
pip install -e .
- name: Simulate reads
run: |
marbel --n-species 3 --n-orthogroups 10 --n-samples 2 4 --library-size 5000 --outdir run_spec10_orth200_samp5-10/
# - name: Create conda env for testing, i.e. install skbio and pandas
# uses: conda-incubator/setup-miniconda@v3
# with:
# activate-environment: anaconda-client-env
# environment-file: tests/env_functional.yaml
# auto-activate-base: true
# - name: debug
# run: |
# pwd
- name: Create conda test-env
run: |
conda create -n marbel-test scikit-bio
- name: Execute functional tests
run: |
conda info
conda env list
conda init
eval "$(conda shell.bash hook)"
conda activate marbel-tests
echo $CONDA_PREFIX
python tests/run_functional.py run_spec10_orth200_samp5-10/