Make Type Completeness Workflow Usable for PRs from Forks (#3551)

This commit is contained in:
Bibo-Joshi 2023-02-13 20:39:12 +01:00 committed by GitHub
parent d5a1a48145
commit ee6c8a5995
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,17 +23,18 @@ jobs:
- name: Install Pyright - name: Install Pyright
run: | run: |
python -W ignore -m pip install pyright~=1.1.291 python -W ignore -m pip install pyright~=1.1.291
- name: Get PR Completeness
# Must run before base completeness, as base completeness will checkout the base branch
# And we can't go back to the PR branch after that in case the PR is coming from a fork
run: |
pip install . -U
pyright --verifytypes telegram --ignoreexternal --outputjson > pr.json || true
pyright --verifytypes telegram --ignoreexternal > pr.readable || true
- name: Get Base Completeness - name: Get Base Completeness
run: | run: |
git checkout ${{ github.base_ref }} git checkout ${{ github.base_ref }}
pip install . -U pip install . -U
pyright --verifytypes telegram --ignoreexternal --outputjson > base.json || true pyright --verifytypes telegram --ignoreexternal --outputjson > base.json || true
- name: Get PR Completeness
run: |
git checkout ${{ github.head_ref }}
pip install . -U
pyright --verifytypes telegram --ignoreexternal --outputjson > pr.json || true
pyright --verifytypes telegram --ignoreexternal > pr.readable || true
- name: Compare Completeness - name: Compare Completeness
uses: jannekem/run-python-script-action@v1 uses: jannekem/run-python-script-action@v1
with: with: