Skip to content

Commit 9735bed

Browse files
committed
feat: add GitHub Actions CI/CD workflows
- Add continuous testing workflow for Node.js 16, 18, and 20 - Add cross-platform testing for Ubuntu, Windows, and macOS - Run tests on push to main/master branches and on PRs - Include build verification in CI pipeline
1 parent 988528c commit 9735bed

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [16.x, 18.x, 20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'yarn'
26+
27+
- name: Install dependencies
28+
run: yarn install --frozen-lockfile
29+
30+
- name: Run tests
31+
run: yarn test
32+
33+
- name: Build project
34+
run: yarn build
35+
36+
lint-and-format:
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
43+
- name: Use Node.js 18.x
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: 18.x
47+
cache: 'yarn'
48+
49+
- name: Install dependencies
50+
run: yarn install --frozen-lockfile
51+
52+
- name: Check TypeScript types
53+
run: yarn build
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Cross-Platform Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test-cross-platform:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
node-version: [18.x]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'yarn'
27+
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
- name: Run tests
32+
run: yarn test
33+
34+
- name: Build project
35+
run: yarn build

0 commit comments

Comments
 (0)