fix delete chat history #4
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: e2e-playwright | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| # Use GitHub Secrets/Variables instead of committed .env | |
| GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} | |
| GROQ_BASE_URL: ${{ vars.GROQ_BASE_URL }} | |
| GROQ_MODEL: ${{ vars.GROQ_MODEL }} | |
| LLM_TIMEOUT_MS: ${{ vars.LLM_TIMEOUT_MS }} | |
| DB_PROVIDER: ${{ vars.DB_PROVIDER }} | |
| SQLITECLOUD_URL: ${{ secrets.SQLITECLOUD_URL }} | |
| JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
| ADMIN_EMAIL: ${{ vars.ADMIN_EMAIL }} | |
| ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }} | |
| FRONTEND_URL: ${{ vars.FRONTEND_URL }} | |
| NODE_ENV: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: npm | |
| - name: Install root dependencies | |
| run: npm ci | |
| - name: Install backend dependencies | |
| run: npm ci --prefix backend | |
| - name: Install frontend dependencies | |
| run: npm ci --prefix frontend | |
| - name: Build frontend | |
| run: npm --prefix frontend run build | |
| - name: Verify required env values are present | |
| run: | | |
| node -e "const required=['GROQ_API_KEY','SQLITECLOUD_URL','JWT_SECRET','ADMIN_PASSWORD']; const miss=required.filter(k=>!process.env[k]); if(miss.length){console.error('Missing required secrets:', miss.join(', ')); process.exit(1)}; console.log('Required secrets loaded from GitHub Secrets/Vars.');" | |
| - name: Run backend syntax checks | |
| run: | | |
| node --check backend/index.js | |
| node --check backend/routes/auth.js | |