-
Notifications
You must be signed in to change notification settings - Fork 249
45 lines (37 loc) · 1.08 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Test
on:
pull_request:
branches: [ main ]
jobs:
test:
if: "!startsWith(github.event.head_commit.message, 'chore')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
env:
BRAVE_API_KEY: ${{ secrets.BRAVE_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
JINA_API_KEY: ${{ secrets.JINA_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npm test
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Run Docker tests
env:
BRAVE_API_KEY: mock_key
GEMINI_API_KEY: mock_key
JINA_API_KEY: mock_key
GOOGLE_API_KEY: mock_key
OPENAI_API_KEY: mock_key
run: npm run test:docker