forked from c-proof/pyglider
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 1.9 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
name: Test pyglider
on: [push, pull_request]
jobs:
test-gliders:
name: pyglider (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pyglider
environment-file: tests/environment.yml
python-version: ${{ matrix.python-version }}
channel-priority: strict
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Conda info
shell: bash -l {0}
run: conda info
- name: install pyglider
shell: bash -l {0}
run: which pip; pip install -e .
- name: Process seaexplorer
shell: bash -l {0}
run: which python; cd tests/example-data/example-seaexplorer; make clean-all; python process_deploymentRealTime.py
- name: Process slocum
shell: bash -l {0}
run: which python; cd tests/example-data/example-slocum; make clean-all; python process_deploymentRealTime.py
- name: Process seaexplorer-legato-flntu-arod-ad2cp
shell: bash -l {0}
run: which python; cd tests/example-data/example-seaexplorer-legato-flntu-arod-ad2cp; make clean-all; python process_deploymentRealTime.py
- name: Run tests
shell: bash -l {0}
run: which python; pytest --cov --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3