Skip to content

Commit 14a360a

Browse files
committed
ci: run check and a Node pack smoke
1 parent cde1cd0 commit 14a360a

1 file changed

Lines changed: 15 additions & 28 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
1-
name: CI
1+
name: ci
22

33
on:
4-
push:
5-
branches: ["**"]
64
pull_request:
5+
push:
6+
branches: [main]
77

88
jobs:
9-
verify:
9+
check:
1010
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
node-version: [24]
11+
timeout-minutes: 15
1412
steps:
15-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1614
- uses: actions/setup-node@v4
1715
with:
18-
node-version: ${{ matrix.node-version }}
16+
node-version: 24
1917
- uses: oven-sh/setup-bun@v2
2018
- run: bun install --frozen-lockfile
21-
- run: bun run lint
22-
- run: bun run format:check
23-
- run: bun run typecheck
24-
- run: bun run typecheck:e2e
25-
- run: bun run test
26-
- run: bun run build
27-
- name: node smoke
19+
- run: bun run check
20+
- name: node consumer smoke
2821
run: |
29-
node -e '
30-
const major = Number(process.versions.node.split(".")[0]);
31-
if (major < 24) {
32-
throw new Error("need Node 24+, got " + process.version);
33-
}
34-
import("./dist/index.js").then((m) => {
35-
if (typeof m.createGmailTools !== "function") {
36-
throw new Error("missing export: createGmailTools");
37-
}
38-
console.log("node smoke ok", process.version);
39-
});
40-
'
22+
set -euo pipefail
23+
TARBALL="$PWD/$(npm pack --silent)"
24+
mkdir -p "$RUNNER_TEMP/c" && cd "$RUNNER_TEMP/c"
25+
npm init -y >/dev/null && npm pkg set type=module >/dev/null
26+
npm install "$TARBALL"
27+
node -e 'import("@corbits/google-tools").then((m) => { for (const n of ["createGmailTools", "createGmailClient", "GmailApiError"]) if (typeof m[n] !== "function") throw new Error("missing export: " + n); })'

0 commit comments

Comments
 (0)