Checks #106
This file contains hidden or 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
name: Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
schedule: | |
- cron: '0 23 * * SUN-THU' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
checks: | |
if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-mcp') || (github.event_name != 'schedule') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "latest" | |
- name: Install dependencies | |
run: uv sync | |
- name: Output installed packages | |
run: | | |
uv pip freeze | |
- name: Output dependency tree | |
run: | | |
uv pip install pipdeptree | |
uv run pipdeptree | |
- name: Run Ruff linter | |
run: uv run ruff check . | |
- name: Run Ruff formatter | |
run: uv run ruff format --check . | |
- name: Run Mypy | |
run: uv run mypy . |