Added comments to new workflow definition files.

This commit is contained in:
Eric Traut 2023-06-08 23:09:15 -06:00
parent b6c8378950
commit 71f0f77afc
3 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,6 @@
# This workflow runs when the "Run mypy_primer on PR" workflow completes.
# It downloads the diff from the other workflow instances and creates
# a summary comment in the PR.
name: Comment with mypy_primer diff
on:

View File

@ -1,6 +1,22 @@
# This workflow runs mypy_primer, a tool that runs pyright on a variety
# of open-source Python projects that are known to type check with pyright.
# It builds pyright from the latest PR commit and the merge base of the PR
# and compares the output of both. It uploads the diffs as an artifact and
# creates a PR comment with the results (with the help of the
# mypy_primer_comment action).
# This workflow definition borrows liberally from the mypy repo. The original
# workflow was designed to work in a sharded manner where n copies of
# mypy_primer are started in parallel. Each instance runs 1/n of the projects.
# For now, we run only one instance because pyright is fast, and the number
# of projects that use pyright for type checking is small. To change this in
# the future, change the 'shard_index' matrix to [0, 1, ..., n-1] and set
# 'num-shards' to n.
name: Run mypy_primer on PR
on:
# Run on the creation or update of a PR.
pull_request:
paths:
- 'packages/pyright/**'

View File

@ -1,6 +1,11 @@
# This workflow runs mypy_primer, a tool that runs pyright on a variety
# of open-source Python projects that are known to type check with pyright.
# It builds pyright from the latest commit and the last release tag and
# compares the output of both. It uploads the diffs as an artifact.
name: Run mypy_primer on push
on:
# Run on all pushes to main.
push:
branches:
- main
@ -8,6 +13,7 @@ on:
- 'packages/pyright/**'
- 'packages/pyright-internal/src/**'
- 'packages/pyright-internal/typeshed-fallback/**'
# Also run manually if requested.
workflow_dispatch:
concurrency: