Skip to content

Commit 6fcdb10

Browse files
test: Add GitHub Actions workflow for testing on macOS and Linux
1 parent 8010bf5 commit 6fcdb10

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/t.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branch: main
4+
tags:
5+
- 'v\d+'
6+
jobs:
7+
test:
8+
strategy:
9+
matrix:
10+
os: [macos-latest, linux-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- run: echo "Checking commit '${{ github.event.head_commit.message }}'"
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node_version: 18.x
18+
- uses: actions/cache@v4
19+
with:
20+
path: ~/.npm
21+
key: ${{ matrix.platform }}-node-${{ hashFiles('**/package-lock.json') }}
22+
if: ${{ github.repository.permissions.admin == true }}
23+
- run: npm install && npm test

0 commit comments

Comments
 (0)