forked from kujaku11/mth5
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.32 KB
/
tests.yml
File metadata and controls
84 lines (73 loc) · 2.32 KB
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
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.10", "3.11", "3.12", "3.13", "3.14"]
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Cache MTH5 Test Fixtures
uses: actions/cache@v3
with:
path: ~/mth5_global_test_cache
key: mth5-fixtures-${{ runner.os }}-${{ hashFiles('mth5/data/make_mth5_from_asc.py', 'mth5/clients/fdsn.py', 'tests/conftest.py') }}
restore-keys: |
mth5-fixtures-${{ runner.os }}-
- name: Create Cache Directory
run: mkdir -p ~/mth5_global_test_cache
- name: Install Env
run: |
python --version
conda install pytest
conda install pytest-cov
conda install pytest-subtests
conda install pytest-xdist[psutil]
conda install pytest-benchmark
conda install setuptools
pip install mt_metadata[obspy]
pip install git+https://github.com/kujaku11/mth5_test_data.git
- name: Install Our Package
run: |
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
run: pytest -vv --cov=./ --cov-report=xml --cov=mth5 -n auto tests -k "not slow"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: tests
fail_ci_if_error: false
verbose: true