-
Notifications
You must be signed in to change notification settings - Fork 140
58 lines (48 loc) · 1.52 KB
/
update-tests-md.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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Update Tests Results
on:
push:
branches:
- main
- test-workflow
pull_request:
branches:
- main
- test-workflow
workflow_dispatch:
jobs:
run_tests_and_update_markdown:
runs-on: ubuntu-latest
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run Jest tests and save results
run: |
npm test -- --json --outputFile=./results.json
continue-on-error: true # Ensures the job continues even if tests fail
- name: Upload test results as an artifact
uses: actions/upload-artifact@v3
with:
name: test-results
path: ./results.json
- name: Update Tests.md with test results
run: node ./tests/updateTestsMd.js # Your custom script to update Tests.md with test results
- name: Upload markdown report as an artifact
uses: actions/upload-artifact@v3
with:
name: test-results-md
path: ./Tests.md