forked from Cloud-Drift/clouddrift
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (65 loc) · 1.97 KB
/
ci.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
name: CI
# Controls when the workflow will run
on:
# Triggers on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
unittest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: clouddrift
create-args: >-
python=${{ matrix.python-version }}
pytest
coverage
matplotlib-base
cartopy
- name: Run unit tests
shell: bash -l {0}
run: coverage run -m pytest tests/*_tests.py tests/adapters/*_tests.py
- name: Display report
shell: bash -l {0}
run: coverage report
- name: Create coverage report
shell: bash -l {0}
run: |
coverage xml
- name: Upload coverage report to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
doctest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: clouddrift
create-args: >-
python=${{ matrix.python-version }}
pytest
- name: Run doc tests
shell: bash -l {0}
run: pytest --doctest-modules clouddrift/ragged.py