Skip to content

Commit 0ef3a37

Browse files
authored
chore(ci): add GitHub Actions workflow for macOS testing (#13)
1 parent b561497 commit 0ef3a37

File tree

3 files changed

+97
-2
lines changed

3 files changed

+97
-2
lines changed

.github/workflows/test-Windows.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test (Windows)
2+
3+
concurrency:
4+
group: windows-test-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches: [main]
10+
11+
merge_group:
12+
13+
workflow_dispatch:
14+
15+
jobs:
16+
test-windows:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
node-version: [22.x]
21+
os: [windows-latest]
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 1
28+
29+
- name: Install Pnpm
30+
run: |
31+
npm install -g corepack@latest --force
32+
corepack enable
33+
34+
- name: Setup Node.js ${{ matrix.node-version }}
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
cache: 'pnpm'
39+
40+
- name: Install Dependencies
41+
run: pnpm install
42+
43+
- name: Build Packages
44+
run: pnpm run build
45+
46+
- name: Unit Test
47+
run: pnpm run test

.github/workflows/test-macOS.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test (macOS)
2+
3+
concurrency:
4+
group: macos-test-${{ github.head_ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches: [main]
10+
11+
merge_group:
12+
13+
workflow_dispatch:
14+
15+
jobs:
16+
test-macos:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
node-version: [22.x]
21+
os: [macos-14] # M1 Mac
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 1
28+
29+
- name: Install Pnpm
30+
run: |
31+
npm install -g corepack@latest --force
32+
corepack enable
33+
34+
- name: Setup Node.js ${{ matrix.node-version }}
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
cache: 'pnpm'
39+
40+
- name: Install Dependencies
41+
run: pnpm install
42+
43+
- name: Build Packages
44+
run: pnpm run build
45+
46+
- name: Unit Test
47+
run: pnpm run test

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@
4949
"typescript": "^5.4.4",
5050
"util-ts-types": "^1.0.0",
5151
"vitest": "1.4.0"
52-
}
53-
}
52+
},
53+
"packageManager": "pnpm@8.15.4+sha256.cea6d0bdf2de3a0549582da3983c70c92ffc577ff4410cbf190817ddc35137c2"
54+
}

0 commit comments

Comments
 (0)