GithubHelp home page GithubHelp logo

pyre-action's Introduction

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@v2

      - name: Run Pyre Action
        # update with the desired version of the action (e.g. `facebook/[email protected]`)
        uses: facebook/pyre-action
        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.

pyre-action's People

Contributors

0xedward avatar connernilsen avatar mrben avatar shannonzhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyre-action's Issues

Error: repository not enabled for code scanning

Hi,

I am trying to run Pyre on a private repo.
But I get this error: Error: repository not enabled for code scanning

I tried to enable code scanning, but it is not that easy:
image

Is Run github/codeql-action/upload-sarif@v2 really mandatory to check the python code style?

Error: the uses attribute must be a path, a Docker image, or owner/repo@ref

When copying the action strait from the README, I get the following error:

Error: .github#L1
the `uses' attribute must be a path, a Docker image, or owner/repo@ref

I solved it in my case by adding @main at the end of the line uses: facebook/pyre-action.

I think the relevent documentation is here: Workflow syntax for GitHub Actions, but I'm not sure what would be the best fixes. It seems that no ref can work if the action is in the repo, which is not the case for me as a simple consumer of the action. Adding @main is fine for me but as I understand it might be a security issue for more serious consumers, you might want to provide a version number, but I have no idea how to do that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.