diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commit-lint.yml similarity index 100% rename from .github/workflows/commitlint.yml rename to .github/workflows/commit-lint.yml diff --git a/.github/workflows/depreview.yml b/.github/workflows/dep-review.yml similarity index 100% rename from .github/workflows/depreview.yml rename to .github/workflows/dep-review.yml diff --git a/.github/workflows/just-lint.yml b/.github/workflows/just-lint.yml new file mode 100644 index 0000000..926ddea --- /dev/null +++ b/.github/workflows/just-lint.yml @@ -0,0 +1,20 @@ +--- +name: Just Lint + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Install just + uses: extractions/setup-just@v3 + - name: Fetch justfiles + run: just fetch + - name: Lint justfiles + run: just just::fmt-check diff --git a/.github/workflows/reportcard.yml b/.github/workflows/report-card.yml similarity index 100% rename from .github/workflows/reportcard.yml rename to .github/workflows/report-card.yml diff --git a/justfile b/justfile index 96e7dab..a60578d 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,9 @@ # Optional modules: mod? allows `just fetch` to work before .just/remote/ exists. # Recipes below use `just` subcommands instead of dependency syntax because just + # validates dependencies at parse time, which would fail when modules aren't loaded. mod? go '.just/remote/go.mod.just' +mod? just '.just/remote/just.mod.just' # --- Fetch --- @@ -10,6 +12,8 @@ fetch: mkdir -p .just/remote curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/go.mod.just -o .just/remote/go.mod.just curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/go.just -o .just/remote/go.just + curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/just.mod.just -o .just/remote/just.mod.just + curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/just.just -o .just/remote/just.just # --- Top-level orchestration --- @@ -21,3 +25,8 @@ deps: # Run all tests test: just go::test + +# Format and lint before committing +ready: + just go::fmt + just go::vet