Skip to content

CI

CI #1651

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.python-version }}-build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v3.3.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
python -m pip install -r dev-requirements.txt
python -m pip install --no-deps -e .
python -m pip list
- name: Type check with mypy
if: ${{ matrix.python-version }} == 3.9
run: invoke mypy
- name: Running Tests
run: |
python -m pytest --cov=./ --cov-report=xml --verbose
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: ${{ matrix.python-version }} == 3.9
with:
file: ./coverage.xml
fail_ci_if_error: false
test-upstream:
name: ${{ matrix.python-version }}-dev-build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v3.3.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: |
python -m pip install -r dev-requirements.txt
python -m pip install --no-deps --upgrade \
git+https://github.com/pydata/xarray
python -m pip install --no-deps -e .
python -m pip list
- name: Running Tests
run: |
python -m pytest --verbose