Skip to content

Commit 2cf7e7b

Browse files
Merge pull request #1 from call-0f-code/test/github-actions
adds github action for running unit tests on every PR
2 parents a509e07 + bc89fa0 commit 2cf7e7b

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: '1.2.18' # or pin to whatever Bun version you need
20+
21+
- name: Cache Bun dependencies
22+
uses: actions/cache@v4
23+
with:
24+
path: |
25+
~/.bun
26+
node_modules
27+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
28+
restore-keys: |
29+
${{ runner.os }}-bun-
30+
31+
- name: Install dependencies
32+
run: bun install
33+
34+
- name: Run tests
35+
run: bun jest
36+

0 commit comments

Comments
 (0)