-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecord-trace.yml
More file actions
50 lines (40 loc) · 1.19 KB
/
Copy pathrecord-trace.yml
File metadata and controls
50 lines (40 loc) · 1.19 KB
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
name: AgentScope Record Trace
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
issues: write
pull-requests: write
jobs:
record:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
# Replace the command below with the command you want to record.
# Examples: npm test, npm run lint, npm run build, npm run ci
- id: record
continue-on-error: true
run: npm run agentscope -- record -- npm run lint
- run: npm run agentscope -- validate .agentscope/*.trace.json
if: always()
- run: npm run agentscope -- summarize --input .agentscope/*.trace.json
if: always() && github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: agentscope-trace
path: .agentscope/*.trace.json
retention-days: 30
- name: Preserve recorded command status
if: steps.record.outcome == 'failure'
run: exit 1