Skip to content

Commit

Permalink
Add: Working Directory to MyPy Action
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself authored and greenbonebot committed Feb 5, 2024
1 parent 7f8db84 commit 560ffda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mypy-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ jobs:
| cache | Cache dependencies by setting it to `"true"`. Leave unset or set to an other string then `"true"` to disable the cache. | Optional |
| cache-dependency-path | Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies. | Optional |
| cache-poetry-installation | "Cache poetry and its dependencies. Default is `"true"`. Set to an other string then `"true"` to disable the cache." | Optional (default: `"true"`) |
| install-dependencies | Install project dependencies. Default is `"true"`. Set to an other string then `"true"` to not install the dependencies. | Optional (default: `"true"`) |
| working-directory | Working directory where to run the action | Optional (default is `${{ github.workspace }}`) |

[mypy]: https://mypy.readthedocs.io/en/stable/
8 changes: 8 additions & 0 deletions mypy-python/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ inputs:
default: "3.10"
poetry-version:
description: "Use a specific poetry version. By default the latest release is used."
install-dependencies:
description: "Install project dependencies. Default is 'true'. Set to an other string then 'true' to not install the dependencies."
default: "true"
working-directory:
description: "Working directory where to run the action"
default: ${{ github.workspace }}
cache:
description: "Cache dependencies by setting it to 'true'. Leave unset or set to an other string then 'true' to disable the cache."
cache-dependency-path:
Expand All @@ -37,6 +43,8 @@ runs:
cache: ${{ inputs.cache }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}
cache-poetry-installation: ${{ inputs.cache-poetry-installation }}
install-dependencies: ${{ inputs.install-dependencies }}
working-directory: ${{ inputs.working-directory }}
- run: poetry run mypy ${{ inputs.mypy-arguments }} ${{ inputs.packages }}
shell: bash
name: Check with mypy
Expand Down

0 comments on commit 560ffda

Please sign in to comment.