Skip to content

Add .pre-commit-hooks.yaml #3767

Add .pre-commit-hooks.yaml

Add .pre-commit-hooks.yaml #3767

Workflow file for this run

name: pyre
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
pyre:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install cython flask flask_cors graphql-core typing_inspect
VERSION=$(grep "version" .pyre_configuration | sed -n -e 's/.*\(0\.0\.[0-9]*\).*/\1/p')
pip install pyre-check-nightly==$VERSION
- name: Run Pyre
continue-on-error: true
run: |
pyre --output=sarif check > sarif.json
- name: Expose SARIF Results
uses: actions/upload-artifact@v2
with:
name: SARIF Results
path: sarif.json
- name: Upload SARIF Results
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: sarif.json
- name: Fail Command On Errors
run: |
if [ "$(cat sarif.json | grep 'PYRE-ERROR')" != "" ]; then cat sarif.json && exit 1; fi