Skip to content

TYP: generic scipy-stubs.odr types #94

TYP: generic scipy-stubs.odr types

TYP: generic scipy-stubs.odr types #94

Workflow file for this run

name: mypy_primer run
permissions: read-all
on:
# only run on pr, since we diff between branches
pull_request:
paths:
- "scipy-stubs/**/*.pyi"
- ".github/workflows/mypy_primer.yml"
- ".github/workflows/mypy_primer_comment.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
mypy_primer:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
steps:
- uses: actions/[email protected]
with:
path: new
fetch-depth: 0
- uses: astral-sh/[email protected]
- name: run mypy_primer
shell: bash
run: |
cd new
MYPY_VERSION=$(grep /mypy- uv.lock | sed -n "s/.*\/mypy-\([^;]*\)-py3.*/\1/p")
echo "new commit"
git checkout $GITHUB_SHA
git rev-list --format=%s --max-count=1 HEAD
MERGE_BASE=$(git merge-base $GITHUB_SHA origin/$GITHUB_BASE_REF)
git worktree add ../old $MERGE_BASE
cd ../old
echo "old commit"
git rev-list --format=%s --max-count=1 HEAD
echo ""
cd ..
uvx \
--from="https://github.com/hauntsaninja/mypy_primer.git" \
mypy_primer \
--project-selector "/(scikit-learn|xarray|freqtrade|jax|optuna|spark|pandera|imagehash|arviz|altair|hydpy|static-frame)/?$" \
--new v${MYPY_VERSION} \
--new-prepend-path new \
--old v${MYPY_VERSION} \
--old-prepend-path old \
--output concise \
--additional-flags="--hide-error-context" \
--show-speed-regression \
--debug > mypy_primer.diff || [ $? -eq 1 ]
# Remove ANSI color codes before uploading
sed -ie 's/\x1b\[[0-9;]*m//g' mypy_primer.diff
echo ${{ github.event.number }} > pr-number
- name: upload mypy_primer.diff
uses: actions/[email protected]
with:
name: mypy_primer-diff
path: mypy_primer.diff
- name: upload pr-number
uses: actions/[email protected]
with:
name: pr-number
path: pr-number