/pyre-action

GitHub Action for Pyre

MIT LicenseMIT

Pyre Github Action

Pyre is a performant type checker for Python compliant with PEP 484. Pyre can analyze codebases with millions of lines of code incrementally – providing instantaneous feedback to developers as they write code.

Pyre GitHub Action enables you to run Pyre in CI and view the results on GitHub Security code scanning UI.

Usage

name: Pyre

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  pyre:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run Pyre Action
        uses: facebook/pyre-action@v0.0.2
        with:
            repo-directory: './'
            requirements-path: 'requirements.txt'

Inputs

repo-directory

Required, Path to the Python source code you want to analyze. If you want to analyze the root of your repo, use './'. The default will be to analyze the root of your repository.

Pyre Action will look for a .pyre_configuration in the root of your repo-directory. If one cannot be found, a default Pyre configuration will be used.

requirements-path

Required, Path to file containing your Python code's dependencies relative to repo-directory. The default will look for requirements.txt in the root of the directory you specified in repo-directory.

version

Which version of Pyre to use. Defaults to the latest stable version of Pyre if the use-nightly flag below is also not set.

use-nightly

When set to true, the action will use the nightly version of Pyre to analyze your Python code. The nightly version of Pyre tends to be unstable and is not recommended unless you are adventurous. By default, the action will use the latest stable version of Pyre.

License

Pyre Action is licensed under the MIT license.