Skip to content

fix: double-check importing correctly errors if render neither behave… #672

fix: double-check importing correctly errors if render neither behave…

fix: double-check importing correctly errors if render neither behave… #672

name: Test
on: [push, pull_request]
jobs:
unit-pip:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip "hatchling < 1.22"
pip install .
- name: Test with pytest
run: |
pip install pytest pytest-cov
pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
python -m pytest --doctest-modules --ignore=example
python -m doctest -v docs/*.md
# name: Test examples
# run: |
# (cd example; examples=$(grep "^\\$ " *.py | sed "s/.*\\$ //g"); while IFS= read -r line; do PYTHONPATH=.:$PYTHONPATH eval $line; done <<< "$examples")
unit-conda:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare to build conda package
run: pip install toml && python .github/workflows/generate_recipe.py
- name: Build conda package
uses: prefix-dev/rattler-build-action@v0.2.2
env:
CONDA_BLD_PATH: /tmp/output
RATTLER_BUILD_EXPERIMENTAL: "true"
with:
recipe-path: ./recipe.yaml
upload-artifact: false
- uses: s-weigand/setup-conda@v1
- name: Install built package
run: |
conda install -c /tmp/output/noarch/*.conda --update-deps --use-local dewret -y
conda install pytest
$CONDA/bin/pytest
python -m pytest --doctest-modules --ignore=example
python -m doctest -v docs/*.md
# name: Test examples
# run: |
# (cd example; examples=$(grep "^\\$ " *.py | sed "s/.*\\$ //g"); while IFS= read -r line; do PYTHONPATH=.:$PYTHONPATH eval $line; done <<< "$examples")