aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-01-17 23:06:26 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-17 23:06:26 -0800
commitbba4054da3a5cbc2f234b9cf4b3ebdb7bb19e69d (patch)
tree9bff7c3bc78b24b20211196f2ab62c0ab8eedeff
parentd16951422bc5c371965874ad656a85d1e2442e85 (diff)
downloadbun-bba4054da3a5cbc2f234b9cf4b3ebdb7bb19e69d.tar.gz
bun-bba4054da3a5cbc2f234b9cf4b3ebdb7bb19e69d.tar.zst
bun-bba4054da3a5cbc2f234b9cf4b3ebdb7bb19e69d.zip
Use canary in CI (#1823)
* Use canary in CI * Only publish canary when types change Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
-rw-r--r--.github/workflows/bun-types-release-canary.yml4
-rw-r--r--.github/workflows/bun-types-release.yml4
-rw-r--r--.github/workflows/bun-types-tests.yml2
-rw-r--r--packages/bun-types/tests/readline.test-d.ts9
4 files changed, 15 insertions, 4 deletions
diff --git a/.github/workflows/bun-types-release-canary.yml b/.github/workflows/bun-types-release-canary.yml
index f3d95aaa2..8f6b30fca 100644
--- a/.github/workflows/bun-types-release-canary.yml
+++ b/.github/workflows/bun-types-release-canary.yml
@@ -2,6 +2,8 @@ name: Release bun-types@canary
on:
push:
branches: [main]
+ paths:
+ - 'packages/bun-types/**'
jobs:
tests:
name: Build, test, publish canary
@@ -22,7 +24,7 @@ jobs:
- name: Install Bun
uses: oven-sh/setup-bun@v0.1.8
with:
- bun-version: latest
+ bun-version: canary
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
diff --git a/.github/workflows/bun-types-release.yml b/.github/workflows/bun-types-release.yml
index 9f36a4a7c..ee3650536 100644
--- a/.github/workflows/bun-types-release.yml
+++ b/.github/workflows/bun-types-release.yml
@@ -16,7 +16,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v0.1.8
with:
- bun-version: latest
+ bun-version: canary
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install node
@@ -88,7 +88,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v0.1.8
with:
- bun-version: latest
+ bun-version: canary
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download all artifacts
diff --git a/.github/workflows/bun-types-tests.yml b/.github/workflows/bun-types-tests.yml
index 5c961139b..173a922e4 100644
--- a/.github/workflows/bun-types-tests.yml
+++ b/.github/workflows/bun-types-tests.yml
@@ -23,7 +23,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v0.1.8
with:
- bun-version: latest
+ bun-version: canary
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install node
diff --git a/packages/bun-types/tests/readline.test-d.ts b/packages/bun-types/tests/readline.test-d.ts
new file mode 100644
index 000000000..b1eecdce0
--- /dev/null
+++ b/packages/bun-types/tests/readline.test-d.ts
@@ -0,0 +1,9 @@
+import * as readline from "node:readline/promises";
+
+const rl = readline.createInterface({
+ input: process.stdin,
+ output: process.stdout,
+ terminal: true,
+});
+const answer = await rl.question("What is your age?\n");
+console.log("Your age is: " + answer);