-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added mypy reviewdog job for pull requests (#71)
* added mypy review dog job for pull requests * installing all deps before running mypy * added additional setup inputs * removed mypy from ci-tests
- Loading branch information
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: reviewdog | ||
on: [pull_request] | ||
jobs: | ||
mypy: | ||
name: runner / mypy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.12"] | ||
env: | ||
# Configure a constant location for the uv cache | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
FORCE_COLOR: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Load cached venv | ||
id: cached-uv-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/.uv-cache | ||
key: uv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }} | ||
- name: Install dependencies | ||
run: | | ||
pip install uv==0.4.15 | ||
uv venv | ||
source .venv/bin/activate | ||
uv sync | ||
- uses: tsuyoshicho/action-mypy@v4 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. | ||
reporter: github-pr-review | ||
# Change reporter level if you need. | ||
# GitHub Status Check won't become failure with warning. | ||
level: warning | ||
setup_command: | | ||
source .venv/bin/activate | ||
setup_method: adaptive | ||
# Change the current directory to run mypy command. | ||
# mypy command reads setup.cfg or other settings file in this path. | ||
workdir: . | ||
target: src |