Skip to content

Commit fc338ea

Browse files
committed
chore: update ci/cd to use latest cache action, and use Bun instead
Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
1 parent 957b359 commit fc338ea

File tree

2 files changed

+68
-81
lines changed

2 files changed

+68
-81
lines changed

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: oven-sh/setup-bun@v2
17+
with:
18+
bun-version: latest
19+
20+
- uses: actions/cache@v4
21+
with:
22+
path: |
23+
~/.bun/install/cache
24+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-bun-
27+
28+
- name: Install dependencies
29+
run: bun install
30+
31+
- name: Run lint
32+
run: bun run lint
33+
34+
test:
35+
name: Test on ${{ matrix.os }}
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: [ubuntu-latest, macos-latest, windows-latest]
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- uses: oven-sh/setup-bun@v2
46+
with:
47+
bun-version: latest
48+
49+
- uses: actions/cache@v4
50+
with:
51+
path: |
52+
~/.bun/install/cache
53+
key: ${{ matrix.os }}-bun-${{ hashFiles('**/bun.lock') }}
54+
restore-keys: |
55+
${{ matrix.os }}-bun-
56+
57+
- name: Install dependencies
58+
run: bun install
59+
60+
- name: Run tests
61+
run: bun run test
62+
63+
# - name: Upload coverage reports
64+
# if: matrix.os == 'ubuntu-latest'
65+
# uses: codecov/codecov-action@v4
66+
# with:
67+
# token: ${{ secrets.CODECOV_TOKEN }}
68+
# fail_ci_if_error: true

.github/workflows/nodejs.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)