-
Notifications
You must be signed in to change notification settings - Fork 14
137 lines (132 loc) · 3.66 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
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
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 12 1 * *' # 12:00, first day of the month
jobs:
lint:
runs-on: ubuntu-latest
env:
PYTHON: 3.9
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
- name: Python info
run: |
which python
python --version
- name: Update apt IPs
run: sudo apt update
- name: Install system pacakges
run: sudo apt install libudunits2-dev libgeos-dev libproj-dev proj-data proj-bin
- name: Install Tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Check format
run: tox -e format
- name: Run linters
run: tox -e lint
docs:
runs-on: ubuntu-latest
env:
PYTHON: 3.9
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
- name: Python info
run: |
which python
python --version
- name: Install system packages
run: sudo apt install libudunits2-dev libgeos-dev libproj-dev proj-data proj-bin pandoc
- name: Install Tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Build docs
run: tox -e docs
venv:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']
experimental: [false]
os: [ubuntu-22.04]
#include:
# - python-version: '3.12'
# experimental: true
# os: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python info
run: |
which python
python --version
- name: Update apt IPs
run: sudo apt update
- name: Install system packages
run: sudo apt install libudunits2-dev libgeos-dev libproj-dev proj-data proj-bin
- name: Cache pip and tox
uses: actions/cache@v3
if: ${{ ! matrix.experimental }}
with:
path: |
~/.cache/pip
~/.cache/srtm
.tox
key: ${{ matrix.os }}-tox-${{ matrix.python-version }}-${{ hashFiles('setup.cfg', 'pyproject.toml') }}
- name: Install Tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run test
continue-on-error: ${{ matrix.experimental }}
run: tox -e py
conda:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']
experimental: [false]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: pya
environment-file: pyaerocom_env.yml
- name: Conda info
run: |
conda --version
conda info --envs
which python
python --version
- name: Install pyaerocom
run: python -m pip install . --no-deps
- name: Run pytest
continue-on-error: ${{ matrix.experimental }}
run: pytest -ra -q --cov --no-cov-on-fail --cov-report xml
- name: Upload coverage to Codecov
if: ${{ success() }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests