Skip to content

Commit a361de5

Browse files
committed
add github workflows
1 parent 97c5342 commit a361de5

3 files changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2+
name: Format Check
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
format-check:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup bun
18+
uses: oven-sh/setup-bun@v2
19+
with:
20+
bun-version: latest
21+
22+
- name: Install dependencies
23+
run: bun install
24+
25+
- name: Run format check
26+
run: bun run format:check

.github/workflows/bun-test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2+
name: Bun Test
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
- '!version-bumps/**'
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
# Skip test for PRs that not chore: bump version
17+
if: "${{ github.event_name != 'pull_request' || github.event.pull_request.title != 'chore: bump version' }}"
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup bun
24+
uses: oven-sh/setup-bun@v2
25+
with:
26+
bun-version: latest
27+
28+
- name: Install dependencies
29+
run: bun install
30+
31+
- name: Run tests
32+
run: bun test
33+
34+
- name: Upload snapshot artifacts
35+
if: always()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: test-snapshots
39+
path: tests/**/__snapshots__/*.diff.png
40+
if-no-files-found: ignore
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2+
name: Type Check
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
type-check:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup bun
18+
uses: oven-sh/setup-bun@v2
19+
with:
20+
bun-version: latest
21+
22+
- name: Install dependencies
23+
run: bun i
24+
25+
- name: Run type check
26+
run: bunx tsc --noEmit

0 commit comments

Comments
 (0)