Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ on:
test: { type: string, default: "@stack" }
build: { type: string, default: "@stack" }

# Design-system verifier (oxlint + @shadcn/lint). Opt-in: no `@stack`
# default, since there is no conventional command for it. Runs on the
# light pool right after Lint. Advisory until the caller's command adds
# `--max-warnings`.
design-lint: { type: string, default: "" }

light-weight: { type: string, default: "light" }
heavy-weight: { type: string, default: "heavy" }

Expand Down Expand Up @@ -210,6 +216,7 @@ jobs:
install: ${{ inputs.install }}
lint: ${{ inputs.lint }}
typecheck: ${{ inputs.typecheck }}
design-lint: ${{ inputs.design-lint }}
java-version: ${{ inputs.java-version }}
node-version: ${{ inputs.node-version }}
bun-version: ${{ inputs.bun-version }}
Expand All @@ -231,6 +238,12 @@ jobs:
set -euo pipefail
. "${{ steps.setup.outputs.env-file }}"
${{ steps.setup.outputs.lint }}
- name: Design lint
if: steps.setup.outputs.design-lint != ''
run: |
set -euo pipefail
. "${{ steps.setup.outputs.env-file }}"
${{ steps.setup.outputs.design-lint }}
- name: Typecheck
if: steps.setup.outputs.typecheck != ''
run: |
Expand Down Expand Up @@ -368,6 +381,7 @@ jobs:
typecheck: ${{ inputs.typecheck }}
test: ${{ inputs.test }}
build: ${{ inputs.build }}
design-lint: ${{ inputs.design-lint }}
java-version: ${{ inputs.java-version }}
node-version: ${{ inputs.node-version }}
bun-version: ${{ inputs.bun-version }}
Expand All @@ -386,6 +400,12 @@ jobs:
set -euo pipefail
. "${{ steps.setup.outputs.env-file }}"
${{ steps.setup.outputs.lint }}
- name: Design lint
if: steps.setup.outputs.design-lint != ''
run: |
set -euo pipefail
. "${{ steps.setup.outputs.env-file }}"
${{ steps.setup.outputs.design-lint }}
- name: Typecheck
if: steps.setup.outputs.typecheck != ''
run: |
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,22 @@ There used to be a caller template per stack. It failed the way templates fail:
the Gradle one carried one product's task name, in a file every other Gradle repo
was told to copy.

### Design lint

An optional step for a design-system verifier (oxlint hosting `@shadcn/lint`),
separate from `lint` because it has its own exit code and its own ratchet.
Default `""` means the step does not exist -- every caller pinned at `@v1` is
unaffected until it opts in. No `@stack` default: there is no conventional
command for this, on any stack.

```yaml
with:
design-lint: bun run lint:design --format=github
```

Warnings are advisory. `--max-warnings N` in the caller's own command is the
ratchet -- tighten it there as the count comes down.

### One job or three

`pr-checks.yml` splits light work from heavy by default. `single-job: true`
Expand Down
12 changes: 12 additions & 0 deletions actions/setup-stack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ inputs:
typecheck: { description: 'Override the typecheck command', default: '@stack' }
test: { description: 'Override the test command', default: '@stack' }
build: { description: 'Override the build command', default: '@stack' }
design-lint:
description: >-
Design-system lint command (e.g. `bun run lint:design` running oxlint +
@shadcn/lint). Empty means no step. No `@stack` default: this is opt-in
per repo.
default: ''

outputs:
env-file:
Expand All @@ -111,6 +117,9 @@ outputs:
build:
description: 'Resolved build command. Empty means skip.'
value: ${{ steps.defaults.outputs.build }}
design-lint:
description: 'Resolved design-lint command. Empty means skip.'
value: ${{ steps.defaults.outputs.design-lint }}

runs:
using: composite
Expand Down Expand Up @@ -276,6 +285,7 @@ runs:
O_TYPECHECK: ${{ inputs.typecheck }}
O_TEST: ${{ inputs.test }}
O_BUILD: ${{ inputs.build }}
O_DESIGN_LINT: ${{ inputs.design-lint }}
run: |
set -euo pipefail
install=""; lint=""; typecheck=""; test=""; build=""
Expand Down Expand Up @@ -324,3 +334,5 @@ runs:
emit typecheck "$(pick "$O_TYPECHECK" "$typecheck")"
emit test "$(pick "$O_TEST" "$test")"
emit build "$(pick "$O_BUILD" "$build")"
# No conventional command for any stack: this is opt-in only.
emit design-lint "$(pick "$O_DESIGN_LINT" "")"