mirror of
https://github.com/supabase/supabase.git
synced 2026-07-06 15:44:23 +08:00
* ci: ai tests * chore(ai-commands): update readme * fix: dont load .env.local in ci environment * fix: pass openai env variable into ci job * feat(ai): llm evaluated tests * chore(ai): remove unused jest snapshots
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: AI Unit Tests & Type Check
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/ai-commands/**'
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/ai-commands/**'
|
|
schedule:
|
|
- cron: '15 0 * * 1' # Every Monday @ 12:15am UTC (off the hour to avoid heavy load times)
|
|
|
|
# Cancel old builds on new commit for same workflow + branch/PR
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x]
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./packages/ai-commands
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: |
|
|
packages
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
- name: Install deps
|
|
run: npm ci
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
- name: Run tests
|
|
run: npm run test
|