Add caching to configurationless migration #4674
This file contains 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: pyre | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
pyre: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: 3.x | |
- name: Install Dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.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 -n --output=sarif check > sarif.json | |
- name: Expose SARIF Results | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: SARIF Results | |
path: sarif.json | |
- name: Upload SARIF Results | |
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 | |
with: | |
sarif_file: sarif.json | |
- name: Fail Command On Errors | |
run: | | |
if [ "$(cat sarif.json | grep 'PYRE-ERROR')" != "" ]; then python -m json.tool sarif.json && exit 1; fi |