Skip to content

Add revalidate_fn optional param to cached_result for additional check if cache should be revalidated #214

Add revalidate_fn optional param to cached_result for additional check if cache should be revalidated

Add revalidate_fn optional param to cached_result for additional check if cache should be revalidated #214

Workflow file for this run

name: Test python package
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flit
flit install --deps develop --symlink
- name: Mypy
run: mypy .
- name: License headers
run: |
apache-license-check --copyright "2019-`date +%Y` SURF" nwastdlib
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
- name: Test with pytest
run: pytest --cov-branch --cov=nwastdlib --cov-report=xml --ignore=tests --ignore=benchmarks
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml