diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml index 7d29b727a..f7531ea51 100644 --- a/.github/workflows/trunk-check.yml +++ b/.github/workflows/trunk-check.yml @@ -12,7 +12,7 @@ on: push: branches: [main, develop] schedule: - - cron: '0 3 * * 1' # Weekly Monday 3am UTC + - cron: "0 3 * * 1" # Weekly Monday 3am UTC concurrency: group: trunk-${{ github.ref }} @@ -26,13 +26,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Trunk Check - uses: trunk-io/trunk-action@d90b9166660d5e5afae248a58172a3a0e99d56d5 # v1.0.4 + uses: trunk-io/trunk-action@e1234e67a86010d61ddac8d8ebf4b783e2ffd2fa # v2.0.0 - name: Trunk Upgrade (on schedule only) if: github.event_name == 'schedule' - uses: trunk-io/trunk-action@d90b9166660d5e5afae248a58172a3a0e99d56d5 # v1.0.4 + uses: trunk-io/trunk-action@e1234e67a86010d61ddac8d8ebf4b783e2ffd2fa # v2.0.0 with: - trunk-args: --upgrade + arguments: --upgrade diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index fbb1fbcb0..ec6feae32 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,113 +1,12 @@ -# ============================================================================= -# Trunk.io — Plugin versions for linting/formatting tools -# ============================================================================= -# This file is auto-generated. Run `trunk upgrade` to update. -# https://docs.trunk.io/check/reference -# ============================================================================= +# Canonical Trunk Code Quality configuration. +# Tool activation is supplied by the pinned Trunk plugin sources. +version: 0.1 + +cli: + version: 1.22.12 plugins: sources: - id: trunk - ref: v1.2.2 - - id: community - ref: main - -# Linters (auto-detected by file type) -linters: - actionlint: - enabled: true - commands: - - name: actionlint - run: actionlint ${target} - direct_configs: - - .github/workflows/*.yml - black: - enabled: true - commands: - - name: black - run: black --check --line-length 100 ${target} - direct_configs: - - pyproject.toml - - ruff.toml - clippy: - enabled: true - commands: - - name: clippy - run: cargo clippy --all-targets --all-features -- -D warnings - eslint: - enabled: true - direct_configs: - - .eslintrc.* - - eslint.config.* - golangci-lint: - enabled: true - direct_configs: - - .golangci.yml - - .golangci.yaml - mypy: - enabled: true - commands: - - name: mypy - run: mypy --ignore-missing-imports ${target} - ruff: - enabled: true - commands: - - name: ruff - run: ruff check --output-format=github ${target} - direct_configs: - - ruff.toml - - pyproject.toml - shellcheck: - enabled: true - taplo: - enabled: true - yamllint: - enabled: true - -# Formatters -formatters: - black: - enabled: true - commands: - - name: black - run: black --line-length 100 ${target} - direct_configs: - - pyproject.toml - prettier: - enabled: true - direct_configs: - - .prettierrc - - prettier.config.* - rustfmt: - enabled: true - commands: - - name: rustfmt - run: rustfmt ${target} - -# Actions (CI optimization) -actions: - trunk-check: - enabled: true - size: 5GB - memory: 16GB - disk: 10GB - trunk-merge: - enabled: true - size: 5GB - trunk-push: - enabled: true - size: 5GB - -# Caching -cache: - enabled: true - storage: local - -# CLI -cli: - version: 1.22.2 - -# Environment -env: - variables: - EDITOR: vim + ref: v1.6.6 + uri: https://github.com/trunk-io/plugins