-
Notifications
You must be signed in to change notification settings - Fork 13
67 lines (61 loc) · 1.74 KB
/
testing_in_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
name: TestingInConda
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
setup-build:
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
update-conda: false
conda-channels: conda-forge
python-version: ${{ matrix.python-version }}
- name: Install Env
shell: bash
run: |
python --version
conda env create -f environment.yml
source activate mtpy-v2-test
pip install git+https://github.com/simpeg/pydiso.git
conda install pytest
conda install pytest-subtests
conda install pytest-cov
pip install git+https://github.com/kujaku11/mt_metadata.git@main
pip install git+https://github.com/kujaku11/mth5.git@master
pip install git+https://github.com/simpeg/aurora@main
git clone https://github.com/MTgeophysics/mtpy_data.git
cd mtpy_data
pip install -e .
cd ..
- name: Install Our Package
shell: bash
run: |
source activate mtpy-v2-test
pip install -e .
conda list
- name: Run Tests
shell: bash
run: |
source activate mtpy-v2-test
pytest --cov=./ --cov-report=xml --cov=mtpy
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: false
verbose: true
flags: tests