name: CI — VS Code on: push: branches: [main, develop] paths: - 'packages/vscode/**' - 'src/lib/**' - '.gitea/workflows/ci-vscode.yml' pull_request: branches: [main] paths: - 'packages/vscode/**' - 'src/lib/**' - '.gitea/workflows/ci-vscode.yml' jobs: vscode: name: VS Code — typecheck, build runs-on: ubuntu-latest timeout-minutes: 15 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/vscode - name: Typecheck run: npm run typecheck working-directory: /tmp/lexai/packages/vscode - name: Build run: npm run build working-directory: /tmp/lexai/packages/vscode - name: Verify output run: ls -la out/extension.js working-directory: /tmp/lexai/packages/vscode - 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 VS Code 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 VS Code FAILED%0ABranch: ${{ gitea.ref_name }}%0ACommit: ${SHA}%0Ahttps://git.juankibin.space/kibin/LexAI/actions"