feat: add RAG (Retrieval-Augmented Generation) module #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, edited] | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| pr-validation: | |
| name: Validate PR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check PR title format | |
| uses: amannn/action-semantic-pull-request@v5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| types: | | |
| feat | |
| fix | |
| docs | |
| style | |
| refactor | |
| perf | |
| test | |
| build | |
| ci | |
| chore | |
| revert | |
| requireScope: false | |
| subjectPattern: ^(?![A-Z]).+$ | |
| subjectPatternError: | | |
| The subject "{subject}" found in the pull request title "{title}" | |
| should start with a lowercase letter. | |
| - name: Check for breaking changes | |
| if: contains(github.event.pull_request.title, '!') | |
| run: | | |
| echo "⚠️ This PR contains breaking changes!" | |
| echo "Please ensure the changelog and migration guide are updated." | |
| build-test: | |
| name: Build & Test PR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n $(git status --porcelain) ]]; then | |
| echo "❌ There are uncommitted changes after build!" | |
| git status --porcelain | |
| exit 1 | |
| fi | |
| size-check: | |
| name: Bundle Size Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npm run build | |
| - name: Check bundle size | |
| run: | | |
| SIZE=$(du -sb dist | cut -f1) | |
| echo "Bundle size: $SIZE bytes" | |
| if [ $SIZE -gt 1000000 ]; then | |
| echo "⚠️ Warning: Bundle size exceeds 1MB" | |
| fi |