-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (61 loc) · 1.97 KB
/
Copy pathci.yml
File metadata and controls
78 lines (61 loc) · 1.97 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Test on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: CLI loads (help)
run: bun run index.ts --help
- name: Version flag
run: bun run index.ts -v
# Public commands (no auth needed)
- name: "quote: real-time (no auth)"
run: bun run index.ts quote SH600519
- name: "quote: multiple symbols"
run: bun run index.ts quote SH600519 SZ000858
- name: "market: indices overview (no auth)"
run: bun run index.ts market
- name: "fund: detail (no auth)"
run: bun run index.ts fund 110011
timeout-minutes: 1
continue-on-error: true
- name: "fund: NAV history (no auth)"
run: bun run index.ts fund 110011 --nav
timeout-minutes: 1
continue-on-error: true
- name: "fund: growth (no auth)"
run: bun run index.ts fund 110011 --growth
timeout-minutes: 1
continue-on-error: true
# Test QR generation (the cross-platform part of login)
- name: "qr: generate and render in terminal"
run: |
bun -e "
import QRCode from 'qrcode';
const text = await QRCode.toString('https://xueqiu.com/test', { type: 'terminal', small: true });
console.log(text);
console.log('QR render OK');
"
shell: bash
# Auth-required commands should fail gracefully
- name: "auth-required: graceful error"
run: |
bun run index.ts kline SH600519 2>&1 || true
shell: bash
- name: "status: shows not logged in"
run: bun run index.ts status