-
Notifications
You must be signed in to change notification settings - Fork 8
77 lines (66 loc) · 1.94 KB
/
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
name: Testing
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
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@v4
- name: Setup Conda
uses: s-weigand/[email protected]
with:
update-conda: false
python-version: ${{ matrix.python-version }}
- name: Install Env
shell: bash
run: |
python --version
conda create -n mth5-test python=${{ matrix.python-version }}
source activate mth5-test
conda install pytest=7.1.2
conda install pytest-cov
conda install pytest-subtests
pip install git+https://github.com/kujaku11/mt_metadata.git@features
- name: Install Our Package
shell: bash
run: |
source activate mth5-test
pip install -e .
conda list
#- name: Install Jupyter and dependencies
# run: |
# source activate mth5-test
# pip install jupyter
# pip install ipykernel
# pip install ipympl
# python -m ipykernel install --user --name mth5-test
# # Install any other dependencies you need
#- name: Execute Jupyter Notebooks
# run: |
# source activate mth5-test
# jupyter nbconvert --to notebook --execute docs/examples/notebooks/make_mth5_driver_v0.2.0.ipynb
- name: Run Tests
shell: bash
run: |
source activate mth5-test
pytest -rA --cov=./ --cov-report=xml --cov=mth5
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: tests
fail_ci_if_error: false
verbose: true