Check Type Completeness Monthly Run #112
This file contains hidden or 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: Check Type Completeness Monthly Run | |
on: | |
schedule: | |
# Run first friday of the month at 03:17 - odd time to spread load on GitHub Actions | |
- cron: '17 3 1-7 * 5' | |
permissions: {} | |
jobs: | |
test-type-completeness: | |
name: test-type-completeness | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Bibo-Joshi/pyright-type-completeness@c85a67ff3c66f51dcbb2d06bfcf4fe83a57d69cc # v1.0.1 | |
id: pyright-type-completeness | |
with: | |
package-name: telegram | |
python-version: 3.12 | |
pyright-version: ~=1.1.367 | |
- name: Check Output | |
uses: jannekem/run-python-script-action@bbfca66c612a28f3eeca0ae40e1f810265e2ea68 # v1.7 | |
env: | |
TYPE_COMPLETENESS: ${{ steps.pyright-type-completeness.outputs.base-completeness-score }} | |
with: | |
script: | | |
import os | |
completeness = float(os.getenv("TYPE_COMPLETENESS")) | |
if completeness >= 1: | |
exit(0) | |
text = f"Type Completeness Decreased to {completeness}. ❌" | |
error(text) | |
set_summary(text) | |
exit(1) |