feat: remove obsolete CI workflows and update documentation for new CI structure
This commit is contained in:
72
.gitea/workflows/ci-cli.yml
Normal file
72
.gitea/workflows/ci-cli.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
name: CI — CLI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
paths:
|
||||
- 'packages/cli/**'
|
||||
- 'src/lib/**'
|
||||
- '.gitea/workflows/ci-cli.yml'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'packages/cli/**'
|
||||
- 'src/lib/**'
|
||||
- '.gitea/workflows/ci-cli.yml'
|
||||
|
||||
jobs:
|
||||
cli:
|
||||
name: CLI — typecheck, build, smoke
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container:
|
||||
image: node:22-bookworm
|
||||
|
||||
steps:
|
||||
- name: Install system deps
|
||||
run: apt-get update -qq && apt-get install -y git ca-certificates -qq
|
||||
|
||||
- name: Clone repository
|
||||
run: |
|
||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git /tmp/lexai
|
||||
cd /tmp/lexai
|
||||
if [ "${{ gitea.event_name }}" = "pull_request" ]; then
|
||||
git fetch origin pull/${{ gitea.event.pull_request.number }}/head:pr
|
||||
git checkout pr
|
||||
else
|
||||
git checkout ${{ gitea.sha }}
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --prefer-offline --no-audit --no-fund
|
||||
working-directory: /tmp/lexai/packages/cli
|
||||
|
||||
- name: Typecheck
|
||||
run: npm run typecheck
|
||||
working-directory: /tmp/lexai/packages/cli
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
working-directory: /tmp/lexai/packages/cli
|
||||
|
||||
- name: Smoke (help + list, no API key)
|
||||
run: |
|
||||
node out/cli.js --help
|
||||
node out/cli.js prompt --list
|
||||
working-directory: /tmp/lexai/packages/cli
|
||||
|
||||
- name: Notify Success
|
||||
if: success()
|
||||
run: |
|
||||
SHA=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||
-d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||
-d "text=✅ LexAI CI CLI Passed%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${SHA}"
|
||||
|
||||
- name: Notify Failure
|
||||
if: failure()
|
||||
run: |
|
||||
SHA=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
||||
curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||
-d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||
-d "text=❌ LexAI CI CLI FAILED%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${SHA}%0Ahttps://git.juankibin.space/kibin/LexAI/actions"
|
||||
Reference in New Issue
Block a user