Recursively resolve references on args and kwargs passed to an reacti… #951
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 13 * * SUN' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre_commit: | |
name: Run pre-commit hooks | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "1" | |
- name: set PY | |
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: pre-commit | |
uses: pre-commit/action@v3.0.0 | |
test_suite: | |
name: Test ${{ matrix.python-version }}, ${{ matrix.platform }} | |
needs: [pre_commit] | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | |
python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9"]') || fromJSON('["3.8", "3.10", "3.12"]') }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- name: Fetch unshallow | |
run: git fetch --prune --tags --unshallow -f | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: env setup | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install hatch | |
- name: temp patch pip for blosc2 | |
if: contains(matrix.platform, 'ubuntu') && matrix.python-version == '3.8' | |
run: echo "PIP_ONLY_BINARY=blosc2" >> $GITHUB_ENV | |
- name: run unit tests | |
if: matrix.python-version != '3.12' | |
run: hatch -v run +py=${{ matrix.python-version }} tests:with_coverage | |
- name: run unit tests (3.12 only) | |
if: matrix.python-version == '3.12' | |
run: | | |
pip install -e ".[tests]" | |
coverage run --source=numbergen,param -m pytest -v tests | |
coverage report | |
coverage xml | |
- name: run examples tests | |
# A notebook fails on Windows (UNIX path used in an example) | |
# No need to run these tests for PyPy really | |
if: contains(matrix.platform, 'ubuntu') && !startsWith(matrix.python-version, 'py') && matrix.python-version != '3.12' | |
run: hatch -v run +py=${{ matrix.python-version }} tests_examples:examples | |
- uses: codecov/codecov-action@v3 | |
if: github.event_name == 'push' |