Skip to content

Commit 5231c11

Browse files
authored
Merge pull request #52 from angiejones/add-ci-workflow
Add CI workflow for automated testing
2 parents 36a7cb3 + 80185a8 commit 5231c11

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18, 20, 22]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- name: Install Chrome (stable)
27+
uses: browser-actions/setup-chrome@v1
28+
with:
29+
chrome-version: stable
30+
id: setup-chrome
31+
32+
- name: Verify Chrome and chromedriver
33+
run: |
34+
echo "Chrome path: ${{ steps.setup-chrome.outputs.chrome-path }}"
35+
google-chrome --version || true
36+
chromedriver --version || true
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Run tests
42+
run: npm test
43+
env:
44+
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"mcp-selenium": "./src/lib/server.js"
99
},
1010
"scripts": {
11-
"test": "node --test \"test/**/*.test.mjs\""
11+
"test": "node --test"
1212
},
1313
"keywords": [],
1414
"author": "",

0 commit comments

Comments
 (0)