From 86ca46fa0abcbbbb1a02b92969e3ef8b3f926e65 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 12 Oct 2020 14:41:51 -0700 Subject: [PATCH] mypy_primer: add to CI (#4629) Co-authored-by: hauntsaninja <> --- .github/workflows/mypy_primer.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/mypy_primer.yml diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml new file mode 100644 index 000000000..0caf0428f --- /dev/null +++ b/.github/workflows/mypy_primer.yml @@ -0,0 +1,34 @@ +name: Run mypy_primer + +on: + # Only run on PR, since we diff against master + pull_request: + +jobs: + mypy_primer: + name: Run mypy_primer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + path: typeshed_to_test + fetch-depth: 0 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install -U pip + pip install git+https://github.com/hauntsaninja/mypy_primer.git + - name: Run mypy_primer + run: | + cd typeshed_to_test + echo "new commit" + git rev-list --format=%s --max-count=1 $GITHUB_SHA + git checkout -b upstream_master origin/master + echo "base commit" + git rev-list --format=%s --max-count=1 upstream_master + cd .. + echo "ATTENTION: failures here shouldn't be treated as blocking; use your judgement" + echo "(Unfortunately, Github doesn't seem to have an \"allowed_failures\" equivalent)" + mypy_primer --new v0.790 --old v0.790 --custom-typeshed-repo typeshed_to_test --new-typeshed $GITHUB_SHA --old-typeshed upstream_master -o concise