mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-02-06 23:12:43 +00:00
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39 to 40. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v39...v40) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
# If you change this name also do it in linting-skipper.yml and ci_metrics.yml
|
|
name: Linting
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "**.py"
|
|
- "**/pyproject.toml"
|
|
- "!haystack/preview/**/*.py"
|
|
- "!test/preview/**/*.py"
|
|
- "!e2e/preview/**/*.py"
|
|
|
|
env:
|
|
PYTHON_VERSION: "3.8"
|
|
|
|
jobs:
|
|
mypy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# With the default value of 1, there are corner cases where tj-actions/changed-files
|
|
# fails with a `no merge base` error
|
|
fetch-depth: 0
|
|
|
|
- name: Get changed files
|
|
id: files
|
|
uses: tj-actions/changed-files@v40
|
|
with:
|
|
files: |
|
|
**/*.py
|
|
files_ignore: |
|
|
test/**
|
|
rest_api/test/**
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- name: Install Haystack
|
|
run: |
|
|
pip install ".[all,dev]"
|
|
pip install --no-deps llvmlite numba "openai-whisper>=20230918"
|
|
|
|
- name: Mypy
|
|
if: steps.files.outputs.any_changed == 'true'
|
|
run: |
|
|
mkdir .mypy_cache/
|
|
mypy --install-types --non-interactive ${{ steps.files.outputs.all_changed_files }} --exclude=rest_api/build/ --exclude=rest_api/test/
|
|
|
|
pylint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# With the default value of 1, there are corner cases where tj-actions/changed-files
|
|
# fails with a `no merge base` error
|
|
fetch-depth: 0
|
|
|
|
- name: Get changed files
|
|
id: files
|
|
uses: tj-actions/changed-files@v40
|
|
with:
|
|
files: |
|
|
**/*.py
|
|
files_ignore: |
|
|
test/**
|
|
rest_api/test/**
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- name: Install Haystack
|
|
run: |
|
|
pip install ".[all,dev]"
|
|
pip install --no-deps llvmlite numba "openai-whisper>=20230918"
|
|
pip install ./haystack-linter
|
|
|
|
- name: Pylint
|
|
if: steps.files.outputs.any_changed == 'true'
|
|
run: |
|
|
pylint -ry -j 0 ${{ steps.files.outputs.all_changed_files }}
|