diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d4cd8474bd..110b54a8bc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,22 +13,31 @@ jobs: fail-fast: false matrix: python-version: [3.7] + defaults: + run: + # https://github.com/conda-incubator/setup-miniconda/tree/v2#use-a-default-shell + shell: bash -l {0} steps: - name: Checkout uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - name: Set up Miniconda with Python ${{ matrix.python-version }} + uses: conda-incubator/setup-miniconda@v2 with: + auto-update-conda: true + miniconda-version: "latest" python-version: ${{ matrix.python-version }} + activate-environment: test_env - name: Install linters run: | python -m pip install --upgrade pip python -m pip install black==22.3.0 flake8==4.0.1 libcst==0.4.1 ufmt==1.3.2 usort==1.0.2 + VERSION=$(grep "version" .pyre_configuration | sed -n -e 's/.*\(0\.0\.[0-9]*\).*/\1/p') + pip install pyre-check-nightly==$VERSION - - name: Print out package info to help with debug + - name: Print out linter package info to help with debug run: pip list - name: Lint with flake8 @@ -36,3 +45,15 @@ jobs: - name: Lint with ufmt (black + usort) run: ufmt check . + + - name: Install dependencies (for Pyre) + run: | + conda install -c conda-forge -y boost-cpp eigen=3.4.0 + pip install torch --extra-index-url https://download.pytorch.org/whl/cpu + pip install -v -e .[dev] + + - name: Print out pyre package info to help with debug + run: pip list + + - name: Run Pyre + run: pyre diff --git a/.pyre_configuration b/.pyre_configuration new file mode 100644 index 0000000000..9f4fcd0063 --- /dev/null +++ b/.pyre_configuration @@ -0,0 +1,12 @@ +{ + "site_package_search_strategy": "all", + "search_path": [ + { + "site-package": "beanmachine" + } + ], + "source_directories": [ + "./src" + ], + "version": "0.0.101665573068" +}