feat(devex): add a unified just command surface
- Command surface: - add a root `Justfile` with namespaced `api`, `ui`, and `release` modules so humans and agents can use the same entrypoints from the repo root - add project-local Justfiles for `booklore-api`, `booklore-ui`, and `tools/release` so each area remains self-contained and can still be driven from inside its own directory - standardize local developer workflows around `just check`, `just test`, `just api run`, `just ui dev`, `just db-up`, and `just image-build` - Workflow integration: - update the reusable test suite workflow to install `just` and run backend and frontend CI steps through the Justfiles instead of hardcoded shell commands - update the semantic-release workflows to install `just` and invoke release tooling via `just release install`, `just release preview`, and `just release run` - keep the Docker image publication workflows on the native Docker actions while moving the project-command logic into the canonical command surface - Documentation: - split backend and frontend implementation guidance into `booklore-api/README.md`, `booklore-api/CONTRIBUTING.md`, `booklore-ui/README.md`, and `booklore-ui/CONTRIBUTING.md` - simplify the top-level `README.md` and `CONTRIBUTING.md` so they stay focused on overview, policy, and navigation while pointing to component-specific guides for deeper detail - align contributor-facing examples on the `just` interface instead of mixing ad hoc Gradle, npm, Docker, and Compose commands - Developer environment: - add `mise.toml` to pin the expected Java and Node toolchain versions for local work - switch the development Compose defaults from the old Booklore database values to Grimmory-oriented defaults - keep the command layout ready for a future API/UI split without forcing that packaging change yet
This commit is contained in:
@@ -51,6 +51,11 @@ jobs:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@0d865d5cc6d507df4765f1f866bfae8bab4e2a73 # v2.69.7
|
||||
with:
|
||||
tool: just
|
||||
|
||||
- name: Set Up Node.js
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
with:
|
||||
@@ -59,7 +64,7 @@ jobs:
|
||||
cache-dependency-path: tools/release/package-lock.json
|
||||
|
||||
- name: Install Release Tooling Dependencies
|
||||
run: npm --prefix tools/release ci
|
||||
run: just release install
|
||||
|
||||
- name: Record Pre-Release HEAD
|
||||
id: pre_release
|
||||
@@ -82,7 +87,7 @@ jobs:
|
||||
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
||||
GIT_COMMITTER_NAME: github-actions[bot]
|
||||
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
||||
run: npx --prefix tools/release semantic-release --extends ./tools/release/release.config.cjs
|
||||
run: just release run
|
||||
|
||||
- name: Capture Release State
|
||||
id: release_state
|
||||
|
||||
@@ -49,6 +49,11 @@ jobs:
|
||||
|
||||
git checkout -B main "$(git rev-parse HEAD)"
|
||||
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@0d865d5cc6d507df4765f1f866bfae8bab4e2a73 # v2.69.7
|
||||
with:
|
||||
tool: just
|
||||
|
||||
- name: Set Up Node.js
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
with:
|
||||
@@ -57,16 +62,13 @@ jobs:
|
||||
cache-dependency-path: tools/release/package-lock.json
|
||||
|
||||
- name: Install Release Tooling Dependencies
|
||||
run: npm --prefix tools/release ci
|
||||
run: just release install
|
||||
|
||||
- name: Run semantic-release Dry Run
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
|
||||
run: |
|
||||
npx --prefix tools/release semantic-release \
|
||||
--dry-run \
|
||||
--extends ./tools/release/release.config.cjs | tee semantic-release-preview.log
|
||||
run: just release preview | tee semantic-release-preview.log
|
||||
|
||||
- name: Upload Preview Output
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
|
||||
@@ -29,6 +29,11 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ inputs.checkout_ref }}
|
||||
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@0d865d5cc6d507df4765f1f866bfae8bab4e2a73 # v2.69.7
|
||||
with:
|
||||
tool: just
|
||||
|
||||
- name: Set Up JDK 25
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
|
||||
with:
|
||||
@@ -38,10 +43,9 @@ jobs:
|
||||
|
||||
- name: Execute Backend Tests
|
||||
id: backend_tests
|
||||
working-directory: ./booklore-api
|
||||
run: |
|
||||
echo "Running backend tests..."
|
||||
./gradlew test --no-daemon --parallel --build-cache
|
||||
just api test
|
||||
continue-on-error: true
|
||||
|
||||
- name: Publish Backend Test Results
|
||||
@@ -82,6 +86,11 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ inputs.checkout_ref }}
|
||||
|
||||
- name: Install just
|
||||
uses: taiki-e/install-action@0d865d5cc6d507df4765f1f866bfae8bab4e2a73 # v2.69.7
|
||||
with:
|
||||
tool: just
|
||||
|
||||
- name: Set Up Node.js
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
with:
|
||||
@@ -90,23 +99,19 @@ jobs:
|
||||
cache-dependency-path: booklore-ui/package-lock.json
|
||||
|
||||
- name: Install Frontend Dependencies
|
||||
working-directory: ./booklore-ui
|
||||
run: npm ci
|
||||
run: just ui install-ci
|
||||
|
||||
- name: Audit Frontend Dependencies
|
||||
working-directory: ./booklore-ui
|
||||
run: npm audit --audit-level=critical
|
||||
run: just ui audit-ci
|
||||
|
||||
- name: Validate Dependency Tree
|
||||
working-directory: ./booklore-ui
|
||||
run: npm ls --depth=0
|
||||
run: just ui deps
|
||||
|
||||
- name: Execute Frontend Tests
|
||||
id: frontend_tests
|
||||
working-directory: ./booklore-ui
|
||||
run: |
|
||||
echo "Running frontend tests..."
|
||||
npx ng test
|
||||
just ui test
|
||||
continue-on-error: true
|
||||
|
||||
- name: Publish Frontend Test Results
|
||||
|
||||
Reference in New Issue
Block a user