Skip to content

Commit e93aa9d

Browse files
authored
ci: add ci workflow (#17)
1 parent e76e180 commit e93aa9d

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 'lts/*'
19+
- name: Install dependencies
20+
run: npm install
21+
- name: Lint files
22+
run: npm run lint
23+
test:
24+
name: Test
25+
strategy:
26+
matrix:
27+
os: [ubuntu-latest]
28+
node: [20.x, 19.x, 18.x, 17.x, 16.x, 14.x, 12.x, "12.22.0"]
29+
include:
30+
- os: windows-latest
31+
node: "lts/*"
32+
- os: macOS-latest
33+
node: "lts/*"
34+
runs-on: ${{ matrix.os }}
35+
steps:
36+
- uses: actions/checkout@v3
37+
- uses: actions/setup-node@v3
38+
with:
39+
node-version: ${{ matrix.node }}
40+
- name: Install dependencies
41+
run: npm install
42+
- name: Run tests
43+
run: npm test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"scripts": {
1919
"lint": "eslint .",
20-
"test": "npm run lint && mocha ./tests/lib/**/*.js",
20+
"test": "mocha ./tests/lib/**/*.js",
2121
"new-rule-format": "node ./bin/eslint-transforms.js -t ./lib/new-rule-format/new-rule-format.js",
2222
"generate-release": "eslint-generate-release",
2323
"generate-alpharelease": "eslint-generate-prerelease alpha",

0 commit comments

Comments
 (0)