Skip to content

Merge pull request #1 from climate-resource/update-v2.6 #4

Merge pull request #1 from climate-resource/update-v2.6

Merge pull request #1 from climate-resource/update-v2.6 #4

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
tags: ['v*']
env:
BOOKSHELF_DOWNLOAD_CACHE_LOCATION: /tmp/pooch
jobs:
linting:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
env:
MYPYPATH: stubs
PRE_COMMIT_HOME: /tmp/.cache/pre-commit
UV_PRERELEASE: allow
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Cache pre-commit
uses: actions/cache@v4
with:
path: /tmp/.cache/pre-commit
key: ${{ runner.os }}-pre-commit
- name: mypy
run: |
uvx pre-commit run --all-files
uv run mypy src
tests:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version:
- "3.11"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash
env:
UV_PRERELEASE: allow
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Cache pooch
uses: actions/cache@v4
with:
path: /tmp/pooch
key: ${{ runner.os }}-${{ matrix.python-version }}-pooch
- name: Check build
run: |
make run
- name: Run tests
run: |
[[ ! -d "tests" ]] && exit 0
uv run pytest src tests -r a -v --doctest-modules