-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Remove mypy deps install step in python_cache action #3956
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,18 +87,9 @@ jobs: | |
- name: Get changed files | ||
id: files | ||
uses: tj-actions/changed-files@v34 | ||
|
||
- name: Filter changed files | ||
id: python-files | ||
run: | | ||
for file in ${{ steps.files.outputs.all_changed_files }}; do | ||
if [[ $file == *.py ]]; then | ||
if [[ $file != test/* ]]; then | ||
changed_files="$changed_files $file" | ||
fi | ||
fi | ||
done | ||
echo "changed_files=$changed_files" >> $GITHUB_OUTPUT | ||
with: | ||
files: | | ||
*.py | ||
|
||
- name: Setup Python | ||
uses: ./.github/actions/python_cache/ | ||
|
@@ -109,7 +100,7 @@ jobs: | |
if: steps.python-files.outputs.changed_files | ||
run: | | ||
mkdir .mypy_cache/ | ||
mypy ${{ steps.python-files.outputs.changed_files }} | ||
mypy --install-types --non-interactive ${{ steps.python-files.outputs.changed_files }} --exclude=rest_api/build/ --exclude=rest_api/test/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: you don't need to exclude anything at this point (provided you filter out changed files)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True that, but might as well leave it I guess? Better safe than sorry. 🤷 |
||
|
||
- uses: act10ns/slack@v1 | ||
with: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can ignore files under
test/
to make the job even faster, see https://github.com/deepset-ai/haystack/pull/3930/files#diff-1db27d93186e46d3b441ece35801b244db8ee144ff1405ca27a163bfe878957fThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I forgot. Adding that.