Mypy Errors Triggered in Local Development #705
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: 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 --ignore=tests/_lib | ||
python -m doctest -v docs/*.md | ||
name: Test examples | ||
run: | | ||
Check failure on line 27 in .github/workflows/python-test-ci.yml GitHub Actions / TestInvalid workflow file
|
||
(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/[email protected] | ||
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 --ignore=tests/_lib | ||
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") |