diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..8dd1596 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,16 @@ +name: Lint GitHub Actions workflows + +on: + pull_request: + paths: + - .github/workflows/*.yml + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Check workflow files + uses: reviewdog/action-actionlint@v1 diff --git a/.github/workflows/gh-deploy.yml b/.github/workflows/gh-deploy.yml index 9aea5b6..93f5020 100644 --- a/.github/workflows/gh-deploy.yml +++ b/.github/workflows/gh-deploy.yml @@ -33,12 +33,13 @@ jobs: uses: ./.github/actions/setup-python-with-uv - name: Generate cache id - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + id: cache + run: echo "id=$(find docs -type f -print0 | sort -z | xargs -0 sha256sum mkdocs.yml pyproject.toml uv.lock | sha256sum | awk '{print $1}')" >> "$GITHUB_OUTPUT" - name: Save cache uses: actions/cache@v5 with: - key: mkdocs-material-${{ env.cache_id }} + key: mkdocs-material-${{ steps.cache.outputs.id }} path: .cache restore-keys: mkdocs-material- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b76b7d5..f2b3c89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,6 +52,11 @@ repos: language: python types: [python] + - repo: https://github.com/rhysd/actionlint + rev: v1.7.10 + hooks: + - id: actionlint + - repo: https://github.com/hadolint/hadolint rev: v2.12.0 hooks: diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 1aa71c5..8ec5de8 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -87,6 +87,7 @@ "pyupgrade", "qodo", "redoc", + "reviewdog", "rootdir", "ropeproject", "scrapy", diff --git a/CLAUDE.md b/CLAUDE.md index ade777d..69de42a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -252,6 +252,7 @@ When adding new utilities to `tools/`, add corresponding documentation to `docs/ ## CI/CD Workflows GitHub Actions workflows in `.github/workflows/`: +- **actionlint.yml**: Lint GitHub Actions workflows - **docker.yml**: Validate Docker build - **devcontainer.yml**: Validate Dev Container configuration - **format.yml**: Check Ruff formatting diff --git a/docs/configurations/index.md b/docs/configurations/index.md index 5153c64..c81e2bc 100644 --- a/docs/configurations/index.md +++ b/docs/configurations/index.md @@ -17,15 +17,15 @@ Each tool is configured through dedicated configuration files in the repository ## Configuration Files -| File | Tool | Purpose | -|------|------|---------| -| `pyproject.toml` | uv, Project | Dependencies and project metadata | -| `ruff.toml` | Ruff | Linting and formatting rules | -| `ty.toml` | ty | Type checking configuration | -| `.sqlfluff` | SQLFluff | SQL linting and formatting rules | -| `pytest.ini` | pytest | Testing and coverage settings | -| `.pre-commit-config.yaml` | pre-commit | Hook definitions | -| `noxfile.py` | nox | Task automation | +| File | Tool | Purpose | +| ------------------------- | ----------- | --------------------------------- | +| `pyproject.toml` | uv, Project | Dependencies and project metadata | +| `ruff.toml` | Ruff | Linting and formatting rules | +| `ty.toml` | ty | Type checking configuration | +| `.sqlfluff` | SQLFluff | SQL linting and formatting rules | +| `pytest.ini` | pytest | Testing and coverage settings | +| `.pre-commit-config.yaml` | pre-commit | Hook definitions | +| `noxfile.py` | nox | Task automation | ## Quick Links diff --git a/docs/configurations/pre-commit.md b/docs/configurations/pre-commit.md index b276b52..6d3912d 100644 --- a/docs/configurations/pre-commit.md +++ b/docs/configurations/pre-commit.md @@ -13,6 +13,8 @@ - [https://github.com/sqlfluff/sqlfluff](https://github.com/sqlfluff/sqlfluff) - SQLFluff Lint - SQLFluff Fix +- [https://github.com/rhysd/actionlint](https://github.com/rhysd/actionlint) + - actionlint - [https://github.com/hadolint/hadolint](https://github.com/hadolint/hadolint) - Hadolint @@ -44,6 +46,11 @@ repos: name: Ruff format description: "Run 'ruff format' for extremely fast Python formatting" + - repo: https://github.com/rhysd/actionlint + rev: v1.7.10 + hooks: + - id: actionlint + - repo: https://github.com/hadolint/hadolint rev: v2.12.0 hooks: diff --git a/docs/guides/index.md b/docs/guides/index.md index badcb91..cafe22f 100644 --- a/docs/guides/index.md +++ b/docs/guides/index.md @@ -10,6 +10,7 @@ This template includes several modern Python development tools, each serving a s - **Ruff** - Lightning-fast linting and formatting - **ty** - Advanced type checking - **SQLFluff** - SQL linting and formatting +- **actionlint** - GitHub Actions workflow linting - **pytest** - Comprehensive testing framework - **nox** - Task automation and workflow management - **pre-commit** - Automated code quality checks diff --git a/docs/index.md b/docs/index.md index 48bcc8c..25bda19 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,6 +15,7 @@ This repository provides a complete, batteries-included development environment - **Ultra-fast package management** - [uv](https://github.com/astral-sh/uv) is 10-100x faster than pip - **Lightning-fast code quality** - [Ruff](https://github.com/astral-sh/ruff) replaces Black, isort, Flake8, and more - **SQL linting** - [SQLFluff](https://github.com/sqlfluff/sqlfluff) for SQL code quality +- **GitHub Actions linting** - [actionlint](https://github.com/rhysd/actionlint) for workflow file quality - **Type safety** - ty for comprehensive type checking - **Automated testing** - pytest with 75% coverage requirement - **Task automation** - nox for streamlined development workflows