-
Notifications
You must be signed in to change notification settings - Fork 76
162 lines (160 loc) · 5.11 KB
/
test.yaml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Test
on:
pull_request:
push: { branches: [master] }
workflow_dispatch:
env:
python_version: '3.10'
RDMAV_FORK_SAFE: 1
jobs:
unit_tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{env.python_version}}
- name: pytest
run: PYTHONPATH=src pytest tests/. --cov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
s0_download:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{env.python_version}}
- name: Test Download (S0)
working-directory: ./src
run: noisepy download --start_date 2019-02-01T00:00:00 --end_date 2019-02-01T02:00:00 --stations ARV,BAK --inc_hours 1 --raw_data_path $RUNNER_TEMP/RAW_DATA
- name: Cache data
uses: actions/cache/save@v3
with:
key: download_data-${{ github.sha }}
path: ${{runner.temp}}
s1_s2:
strategy:
fail-fast: true
matrix:
python_version: ['3.9', '3.10']
method: [linear,robust, nroot, selective, auto_covariance, pws]
freq_norm: [rma]
format: [asdf]
substack: [false]
include:
- method: linear
python_version: '3.10'
freq_norm: no
format: zarr
substack: true
- method: all
python_version: '3.9'
freq_norm: phase_only
format: numpy
runs-on: ubuntu-22.04
needs: s0_download
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
- name: Cache data
id: cache
uses: actions/cache/restore@v3
with:
key: download_data-${{ github.sha }}
path: ${{runner.temp}}
- name: Check cache hit
if: steps.cache.outputs.cache-hit != 'true'
run: exit 1
- name: Test Cross-Correlation (S1)
working-directory: ./src
run: |
noisepy cross_correlate --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --freq_norm ${{matrix.freq_norm}} --format ${{matrix.format}}
- name: Test Stacking (S2)
working-directory: ./src
run: |
noisepy stack --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --stack_path $RUNNER_TEMP/STACK --stack_method ${{matrix.method}} --format ${{matrix.format}}
s1_s2_mpi:
strategy:
fail-fast: true
matrix:
python_version: ['3.10']
method: [linear]
freq_norm: [rma]
runs-on: ubuntu-22.04
needs: s0_download
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
mpi: 'true'
- name: Cache data
id: cache
uses: actions/cache/restore@v3
with:
key: download_data-${{ github.sha }}
path: ${{runner.temp}}
- name: Check cache hit
if: steps.cache.outputs.cache-hit != 'true'
run: exit 1
- name: Test Cross-Correlation (S1)
working-directory: ./src
run: |
mpiexec -n 2 noisepy cross_correlate --mpi --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --freq_norm ${{matrix.freq_norm}}
- name: Test Stacking (S2)
working-directory: ./src
run: |
mpiexec -n 3 noisepy stack --mpi --raw_data_path $RUNNER_TEMP/RAW_DATA --ccf_path $RUNNER_TEMP/CCF --stack_path $RUNNER_TEMP/STACK --stack_method ${{matrix.method}}
s3_dates:
strategy:
fail-fast: true
matrix:
python_version: ['3.9', '3.10']
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
- name: Test S3 data for a date range
run: |
noisepy cross_correlate --raw_data_path s3://scedc-pds/continuous_waveforms/ \
--ccf_path $RUNNER_TEMP/CCF_S3 --freq_norm rma \
--xml_path s3://scedc-pds/FDSNstationXML/CI/ \
--stations "SBC,RIO" --start_date 2022-02-02 --end_date 2022-02-04 \
--config configs/s3_anon.yaml
s3_singlepath:
strategy:
fail-fast: true
matrix:
python_version: ['3.9', '3.10']
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup NoisePy
uses: ./.github/actions/setup
with:
python-version: ${{matrix.python_version}}
- name: Test S3 data with a single path
run: |
noisepy cross_correlate --raw_data_path s3://scedc-pds/continuous_waveforms/2022/2022_002/ \
--ccf_path $RUNNER_TEMP/CCF_S3 --freq_norm rma \
--xml_path s3://scedc-pds/FDSNstationXML/CI/ \
--stations "SBC,RIO" \
--config configs/s3_anon.yaml