-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (111 loc) · 3.27 KB
/
check.yml
File metadata and controls
135 lines (111 loc) · 3.27 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Check
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
env:
DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }}
DAYTONA_API_URL: ${{ vars.DAYTONA_API_URL }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
jobs:
Check:
name: Check
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Biome check
run: bun run check
- name: TypeScript typecheck
run: bun run typecheck
- name: Unit tests
run: bun test
- name: CLI smoke checks
run: |
bun src/sandcode.ts --help
bun src/sandcode.ts analyze --help
bun src/sandcode.ts start --help
bun src/sandcode.ts setup --help
BuildPackage:
name: Build Package Artifact
runs-on: blacksmith-2vcpu-ubuntu-2404
needs: Check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build package
run: bun run build
- name: Pack tarball
run: |
mkdir -p artifacts
npm pack --pack-destination artifacts
ls -la artifacts
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: npm-package
path: artifacts/*.tgz
if-no-files-found: error
PackageE2E:
name: Package Install E2E
runs-on: blacksmith-2vcpu-ubuntu-2404
needs: BuildPackage
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: npm-package
path: artifacts
- name: Install package into clean project
run: |
mkdir e2e-install
cd e2e-install
npm init -y
npm install ../artifacts/*.tgz
- name: Run installed CLI binary
run: |
cd e2e-install
./node_modules/.bin/sandcode --help
./node_modules/.bin/sandcode analyze --help
./node_modules/.bin/sandcode start --help
./node_modules/.bin/sandcode setup --help
- name: Run installed setup smoke
run: |
cd e2e-install
mkdir -p home-smoke/vaults/test
HOME="$PWD/home-smoke" ./node_modules/.bin/sandcode setup --yes \
--vault-path ~/vaults/test \
--obsidian-integration desktop \
--notes-root Research/Sandcode \
--catalog-mode repo \
--daytona-api-key daytona-test \
--opencode-api-key opencode-test
test -f home-smoke/.config/sandcode/sandcode.toml
test -f home-smoke/.config/sandcode/.env