ci: add a git.json metadata file during build
Some checks failed
🚀 Lint & Test & Deploy / release (push) Failing after 3m14s
Some checks failed
🚀 Lint & Test & Deploy / release (push) Failing after 3m14s
This commit is contained in:
@@ -13,16 +13,12 @@
|
||||
"markdown": {},
|
||||
"toml": {},
|
||||
"dockerfile": {},
|
||||
"ruff": {},
|
||||
"jupyter": {},
|
||||
"malva": {},
|
||||
"markup": {
|
||||
// https://dprint.dev/plugins/markup_fmt/config/
|
||||
"scriptIndent": true,
|
||||
"styleIndent": true,
|
||||
},
|
||||
"yaml": {},
|
||||
"graphql": {},
|
||||
"exec": {
|
||||
"cwd": "${configDir}",
|
||||
"commands": [
|
||||
@@ -53,13 +49,8 @@
|
||||
"https://plugins.dprint.dev/markdown-0.20.0.wasm",
|
||||
"https://plugins.dprint.dev/toml-0.7.0.wasm",
|
||||
"https://plugins.dprint.dev/dockerfile-0.3.3.wasm",
|
||||
"https://plugins.dprint.dev/ruff-0.6.11.wasm",
|
||||
"https://plugins.dprint.dev/jupyter-0.2.1.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/malva-v0.15.1.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.25.3.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/pretty_graphql-v0.2.3.wasm",
|
||||
"https://plugins.dprint.dev/exec-0.6.0.json@a054130d458f124f9b5c91484833828950723a5af3f8ff2bd1523bd47b83b364",
|
||||
"https://plugins.dprint.dev/biome-0.11.10.wasm",
|
||||
],
|
||||
}
|
||||
|
||||
28
.gitea/scripts/build.sh
Executable file
28
.gitea/scripts/build.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
mkdir -p app/static
|
||||
|
||||
cp CHANGELOG.md app/static/CHANGELOG.md
|
||||
|
||||
cat >app/static/git.json <<EOF
|
||||
{
|
||||
"ref": "${GITEA_REF:-}",
|
||||
"ref_name": "${GITEA_REF_NAME:-}",
|
||||
"ref_type": "${GITEA_REF_TYPE:-}",
|
||||
"sha": "${GITEA_SHA:-}",
|
||||
"run_number": "${GITEA_RUN_NUMBER:-}",
|
||||
"server_url": "${GITEA_SERVER_URL:-}",
|
||||
"event_name": "${GITEA_EVENT_NAME:-}",
|
||||
"workflow": "${GITEA_WORKFLOW:-}",
|
||||
"job": "${GITEA_JOB:-}",
|
||||
"commit_message": "${GITEA_COMMIT_MESSAGE:-}",
|
||||
"commit_timestamp": "${GITEA_COMMIT_TIMESTAMP:-}",
|
||||
"branch": "${GITEA_HEAD_REF:-}",
|
||||
"base_branch": "${GITEA_BASE_REF:-}"
|
||||
}
|
||||
EOF
|
||||
|
||||
pnpm build
|
||||
|
||||
cp -R packages/ui/build app/build/ui
|
||||
16
.gitea/scripts/ci-checks.sh
Executable file
16
.gitea/scripts/ci-checks.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
pnpm lint &
|
||||
LINT_PID=$!
|
||||
pnpm format:check &
|
||||
FORMAT_PID=$!
|
||||
pnpm check &
|
||||
TYPE_PID=$!
|
||||
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" pnpm test &
|
||||
TEST_PID=$!
|
||||
|
||||
wait $LINT_PID
|
||||
wait $FORMAT_PID
|
||||
wait $TYPE_PID
|
||||
wait $TEST_PID
|
||||
@@ -46,20 +46,11 @@ jobs:
|
||||
- name: 📦 Install Dependencies
|
||||
run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }}
|
||||
|
||||
- name: 🧹 Lint
|
||||
run: pnpm lint
|
||||
|
||||
- name: 🎨 Format Check
|
||||
run: pnpm format:check
|
||||
|
||||
- name: 🧬 Type Check
|
||||
run: pnpm check
|
||||
- name: 🧹 Quality Control
|
||||
run: ./.gitea/scripts/ci-checks.sh
|
||||
|
||||
- name: 🛠️ Build
|
||||
run: pnpm build:deploy
|
||||
|
||||
- name: 🔬 Tests
|
||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" pnpm test
|
||||
run: ./.gitea/scripts/build.sh
|
||||
|
||||
- name: 🚀 Create Release Commit
|
||||
if: gitea.ref_type == 'tag'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM node:25-bookworm-slim
|
||||
|
||||
RUN apt update && apt install -y \
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
git \
|
||||
jq \
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
"version": "0.0.2",
|
||||
"scripts": {
|
||||
"postinstall": "pnpm run -r --filter 'ui' build",
|
||||
"build": "pnpm build:nodes && pnpm build:app",
|
||||
"lint": "pnpm run -r --parallel lint",
|
||||
"format": "pnpm dprint fmt",
|
||||
"format:check": "pnpm dprint check",
|
||||
"test": "pnpm run -r test",
|
||||
"check": "pnpm run -r check",
|
||||
"build:story": "pnpm -r --filter 'ui' story:build",
|
||||
"build": "pnpm build:nodes && pnpm build:app",
|
||||
"build:app": "BASE_PATH=/ui pnpm -r --filter 'ui' build && pnpm -r --filter 'app' build",
|
||||
"build:nodes": "cargo build --workspace --target wasm32-unknown-unknown --release && rm -rf ./app/static/nodes/max/plantarium/ && mkdir -p ./app/static/nodes/max/plantarium/ && cp -R ./target/wasm32-unknown-unknown/release/*.wasm ./app/static/nodes/max/plantarium/",
|
||||
"build:deploy": "cp CHANGELOG.md app/static/CHANGELOG.md && pnpm build && cp -R packages/ui/build app/build/ui",
|
||||
"dev:nodes": "chokidar './nodes/**' --initial -i '/pkg/' -c 'pnpm build:nodes'",
|
||||
"dev:app_ui": "pnpm -r --parallel --filter 'app' --filter './packages/ui' dev",
|
||||
"dev_ui": "pnpm -r --filter 'ui' dev:ui",
|
||||
|
||||
Reference in New Issue
Block a user