-
Notifications
You must be signed in to change notification settings - Fork 10
73 lines (66 loc) · 2.18 KB
/
pyrad_tests_base_dev.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
name: Test pyrad base dev
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
unit_tests:
name: Unit Tests (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" , "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
max-parallel: 6
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
ref : dev
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install dependencies
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/environment-ci.yml
activate-environment: pyrad-dev
cache-downloads: true
python-version: ${{ matrix.python-version }}
- name: Clone pyart
uses: actions/checkout@master
with:
repository: ARM-DOE/pyart
path: pyart
- name: Clone pyrad-tests
uses: actions/checkout@master
with:
repository: MeteoSwiss/pyrad-tests
path: pyrad-tests
- name: Install pyart
working-directory: ${{github.workspace}}/pyart/
run: python -m pip install .
- name: Install pyrad
if: matrix.os != 'macos-latest'
working-directory: ${{github.workspace}}/src/pyrad_proc/
run: python -m pip install .
- name: Check imports
working-directory: ${{github.workspace}}/pyrad-tests/
run: |
python -c "import pyrad; print(pyrad.__file__)"
python -c "from pyrad.flow import main"
- name: Run tests
env:
PYRAD_TESTS_PATH: ${{github.workspace}}/pyrad-tests/
working-directory: ${{github.workspace}}/pyrad-tests/
run: pytest "run_tests.py::test_base"
- name: tmate session if tests fail
if: ${{ github.event_name == 'workflow_dispatch' && failure() }}
uses: mxschmitt/action-tmate@v3