-
Notifications
You must be signed in to change notification settings - Fork 65
88 lines (83 loc) · 2.87 KB
/
pytest_conda_linux.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
name: CPU PyTest in Conda Work Branch
on:
push:
branches:
- 'work'
paths-ignore:
- '.github/workflows/**'
- 'docs/**'
jobs:
build-linux-and-start-pytest:
runs-on: cpu
steps:
- uses: actions/checkout@v3
# - name: Add conda to system path
# run: |
# # $CONDA_PREFIX is an environment variable pointing to the root of the miniconda directory
# echo $CONDA_PREFIX/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
echo "use conda in $(which conda)"
conda env update --file tests/workflows_conf/environment_linux_py38.yml --name test -q
- name: Activate conda enviroment
run: |
echo "use conda in $(which conda)"
conda init --all
source ~/.bashrc
conda activate test
echo "use pip in $(which pip)"
echo "use python in $(which python)"
- name: Install Stereopy dependencies
run: |
echo "use conda in $(which conda)"
conda init --all
source ~/.bashrc
conda activate test
echo "use pip in $(which pip)"
echo "use python in $(which python)"
pip install -r requirements.txt -q
pip install -r tests/extra_requirements.txt -q
pip install pathlib -q
pip install pytest-xdist
python setup.py develop
- name: Show Env Info
run: |
echo "use conda in $(which conda)"
conda init --all
source ~/.bashrc
conda activate test
echo "use pip in $(which pip)"
echo "use python in $(which python)"
conda info
env
pip list
- name: Test with pytest
run: |
echo "use conda in $(which conda)"
conda init --all
source ~/.bashrc
conda activate test
echo "use python in $(which python)"
# TODO ~/anaconda3/envs/test/bin/python -m pytest -m "not gpu and not heavy and not cell_cut_env" --durations=0
python -m pytest -m "not gpu and not heavy and not cell_cut_env" --durations=0
python setup.py develop
- name: Show Env Info
run: |
echo "use conda in $(which conda)"
conda init --all
source ~/.bashrc
conda activate test
echo "use pip in $(which pip)"
echo "use python in $(which python)"
conda info
env
pip list
- name: Test with pytest
run: |
echo "use conda in $(which conda)"
conda init --all
source ~/.bashrc
conda activate test
echo "use python in $(which python)"
# TODO ~/anaconda3/envs/test/bin/python -m pytest -m "not gpu and not heavy and not cell_cut_env" --durations=0
python -m pytest -m "not gpu and not heavy and not cell_cut_env" --durations=0