From 2f78fbb4366e59c2571b2e2c347e4ae13ab9b61c Mon Sep 17 00:00:00 2001 From: john Date: Tue, 21 Jul 2026 17:09:45 +0800 Subject: [PATCH] ci: verify memind_adm release candidates --- .gitea/workflows/ci.yml | 51 +++++++++++++++++++++++++++++++++++++ scripts/.releaseignore-prod | 1 + 2 files changed, 52 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..56eff4a --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,51 @@ +name: memind_adm CI + +on: + push: + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: memind-adm-ci-${{ gitea.ref }} + cancel-in-progress: true + +jobs: + verify: + name: Test, build, and release script checks + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Check out exact commit + run: | + git init . + git remote add origin https://git.tkmind.cn/tkmind/memind_adm.git + git fetch --depth=2 origin "${{ gitea.sha }}" + git checkout --detach FETCH_HEAD + test "$(git rev-parse HEAD)" = "${{ gitea.sha }}" + + - name: Install locked dependencies + run: npm ci --no-audit --no-fund + + - name: Check patch formatting + run: git diff --check HEAD^ HEAD + + - name: Run Admin API tests + run: npm test + + - name: Build production frontend + run: VITE_BASE_PATH=/ops npm run build + + - name: Check release scripts + run: | + bash -n scripts/release-prod.sh + bash -n scripts/check-gray-ready.sh + bash -n scripts/deploy-gray-103.sh + + - name: Confirm build leaves the worktree clean + run: test -z "$(git status --porcelain=v1 --untracked-files=all)" diff --git a/scripts/.releaseignore-prod b/scripts/.releaseignore-prod index 8f8c222..4f0f3b3 100644 --- a/scripts/.releaseignore-prod +++ b/scripts/.releaseignore-prod @@ -1,4 +1,5 @@ .git +.gitea .gitignore .DS_Store .env