ICOS CO2 Reader #4990
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |