-
Notifications
You must be signed in to change notification settings - Fork 29
167 lines (162 loc) · 5.73 KB
/
run_tests.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
163
164
165
166
167
name: Unit tests
on: [push, pull_request, workflow_dispatch]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
runtests: ${{ steps.check.outputs.runtests }}
steps:
- id: check
run: |
output='false'
if [[ "${{ github.event_name }}" != pull_request ]]
then
runtests='true'
elif [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.event.pull_request.base.repo.full_name }}" ]]
then
runtests='true'
fi
echo "runtests=${runtests}" >> $GITHUB_OUTPUT
build:
needs: [prepare]
if: needs.prepare.outputs.runtests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('NuRadioMC/test/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt-get install libgsl-dev
python -m pip install --upgrade pip
pip install flake8 pytest
export GSLDIR=$(gsl-config --prefix)
python install_dev.py --install --no-interactive
pip uninstall numba -y # easiest way to test ARZ without numba
export PYTHONPATH=$(pwd):$PYTHONPATH
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Lint with flake8 (important)
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Lint with flake8 (unimportant)
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics --exit-zero
- name: "Single event test (South Pole)"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/SingleEvents/test_build.sh
- name: Single event test (Moore's Bay)
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/SingleEvents/validate_MB.sh
- name: Single event test (ARZ)
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/SingleEvents/validate_ARZ.sh
- name: Test Numba version of ARZ
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
pip install numba
NuRadioMC/test/SingleEvents/validate_ARZ.sh
- name: Signal generation test
if: always()
run : |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/SignalGen/test_build.sh
- name: "Signal propagation tests"
if: always()
run: |
export PYTHONPATH=$PWD:$PYTHONPATH
export GSLDIR=$(gsl-config --prefix)
NuRadioMC/test/SignalProp/run_signal_test.sh
- name: "Test ray tracing modules"
if: always()
run: |
export PYTHONPATH=$PWD:$PYTHONPATH
export GSLDIR=$(gsl-config --prefix)
python NuRadioMC/SignalProp/examples/ray_tracing_modules.py
- name: "Test Veff example"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
python install_dev.py --dev proposal --no-interactive
NuRadioMC/test/examples/test_veff_example.sh
- name: "Test calibration pulser example"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/examples/test_emitter_example.sh
- name: "Test radio emitter pulser example"
if: always()
run: |
export PYTHONPATH=$PWD:$PYTHONPATH
export GSLDIR=$(gsl-config --prefix)
NuRadioMC/test/examples/test_radio_emitting_pulser_example.sh
- name: "Test webinar examples"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/examples/test_webinar.sh
- name: "Veff test"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/Veff/1e18eV/test_build.sh
- name: "Veff test with noise and phased array"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/Veff/1e18eV/test_build_noise.sh
- name: "Atmospheric Aeff test"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioMC/test/atmospheric_Aeff/1e18eV/test_build.sh
- name: "Tiny reconstrucution"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioReco/test/tiny_reconstruction/testTinyReconstruction.sh
- name: "Trigger tests"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioReco/test/trigger_tests/run_trigger_test.sh
- name: "Test all examples"
if: always()
run: |
export GSLDIR=$(gsl-config --prefix)
export PYTHONPATH=$(pwd):$PYTHONPATH
NuRadioReco/test/test_examples.sh